Skip to main content
Encoding Utilities

Explore the encoding utility steps in Torq.

Updated over 2 months ago

Use these utility steps to encode or decode data. See below for examples of each step's input and output.

Convert CSV to JSON

Converts CSV files to JSON

Input

a,b,c,d
1,2,3,4
5,6,7,8

Output

 "result": [
{
"a": "1",
"b": "2",
"c": "3",
"d": "4"
},
{
"a": "5",
"b": "6",
"c": "7",
"d": "8"
}
],

Convert EML to JSON

Converts EML file to JSON.

Input

From: Diana Leib <diana.leib@twistt.io>
Content-Type: text/plain;
charset=us-ascii
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\))
Subject: New email
X-Universally-Unique-Identifier: D82FDA18-F522-4E4D-AF27-D93330929636
Message-Id: <78R6L98-3FFA-4B9C-906C-91FC54E3B3FE@twistt.io>
Date: Thu, 6 Oct 2022 16:33:00 +0300
To: Ulysses Bedford <ulysses.bedford@twistt.io>
Content here

Output

{
"result": {
"headers": {
"Content-Transfer-Encoding": "7bit",
"Content-Type": "text/plain; charset=us-ascii",
"Date": "Thu, 6 Oct 2022 16:33:00 +0300",
"From": "Diana Leib <diana.leib@twistt.io>",
"Message-Id": "<78R6L98-3FFA-4B9C-906C-91FC54E3B3FE@twistt.io>",
"Mime-Version": "1.0 (Mac OS X Mail 16.0 \\(3696.120.41.1.1\\))",
"Subject": "New email",
"To": "Ulysses Bedford <ulysses.bedford@twistt.io>",
"X-Universally-Unique-Identifier": "D82FDA18-F522-4E4D-AF27-D93330929636"
},
"text": "This is the content of the email",
"html": "",
"attachments": [],
"inline_objects": []
}
}
}

Convert JSON to YAML

Converts a given JSON object to YAML.

Input

{
"outer_key": {
"inner_key": [1,2,3]
}
}

Output

{"result": "outer_key:\n  inner_key:\n  - 1\n  - 2\n  - 3\n",}

Decode base64

Decodes a base64 string.

Input

c2FtcGxlIGVuY29kZWQgYmFzZTY0IHN0cmluZw==** **

Output

sample encoded base64 string


Decode hex

Decodes a hex string.

Input

73616d706c652068657820656e636f64656420737472696e67** **

Output

sample hex encoded string


Decode JSON

Decodes a JSON string and returns a JSON object.


Decode URL

Decodes a URL string.

Input

http%3A%2F%2Fapi.plos.org%2Fsearch%3Fq%3Dtitle%3A%22Drosophila%22+AND+body%3A%22RNA%22%26fl%3Did%2Cabstract** **

Output

http://api.plos.org/search?q=title:\"Drosophila\" AND body:"RNA"&fl=id,abstract


Encode base64

Applies base64 encoding to a given string.

Input

Encode this base64 string** **

Output

RW5jb2RlIHRoaXMgYmFzZTY0IHN0cmluZw==** **


Encode hex

Encodes a string into hex.

Input

sample hex encoded string** **

Output

73616d706c652068657820656e636f64656420737472696e67** **


Encode URL

Encodes the inputted URL.

Input

http://api.plos.org/search?q=title:"HW" AND body:"RNA"&fl=id,abstract

Output

http%3A%2F%2Fapi.plos.org%2Fsearch%3Fq%3Dtitle%3A%22HW%22+AND+body%3A%22RNA%22%26fl%3Did%2Cabstract


Markdown to PDF

Render markdown to PDF file. Enter markdown and the step will output a PDF.

Did this answer your question?