Encoding Steps

Steps for parsing and encoding JSON, Base64, URLs, and HTML entities.

Encoding Steps

Encoding steps convert data between formats -- parsing JSON strings into objects, encoding data to Base64, and escaping URLs and HTML.

JSON Parse

Parses a JSON string into a JavaScript object or array.

Value: vars.apiResponse.body
Assign To: data

External API Call steps automatically parse JSON responses, so you usually do not need JSON Parse for API results. Use it for JSON stored in files or database fields.

JSON Stringify

Converts an object or array to a JSON string.

Value: { users: vars.users, total: vars.count }
Pretty: true
Assign To: jsonString

Base64 Encode

Encodes data to a Base64 string.

Value: vars.fileContent
Assign To: encoded

Base64 Decode

Decodes a Base64 string back to its original form.

Value: vars.encodedData
Encoding: utf-8
Assign To: decoded

URL Encode

Encodes a string for safe use in URLs, replacing special characters with percent-encoded equivalents.

Value: vars.searchQuery
Assign To: encodedQuery

Result: "hello world" becomes "hello%20world"

URL Decode

Decodes a percent-encoded URL string back to its original form.

Value: query.q
Assign To: searchTerm

HTML Encode

Encodes special characters as HTML entities to prevent XSS when rendering user content.

Value: vars.userComment
Assign To: safeComment

Result: "<script>alert('xss')</script>" becomes "&lt;script&gt;alert(&#39;xss&#39;)&lt;/script&gt;"

HTML Decode

Decodes HTML entities back to their original characters.

Value: vars.encodedContent
Assign To: decodedContent
The JSON string to parse.
Variable name to store the parsed result.
The value to serialize.
Whether to format with indentation. Defaults to false.
Variable name to store the JSON string.
The string or buffer to encode.
Variable name to store the encoded string.
The Base64 string to decode.
Output encoding: `utf-8`, `binary`. Defaults to `utf-8`.
Variable name to store the decoded result.
The string to encode.
Variable name to store the encoded string.
The encoded string to decode.
Variable name to store the decoded string.
The string to encode.
Variable name to store the encoded string.
The HTML-encoded string to decode.
Variable name to store the decoded string.
Steps Reference
/reference/steps
Browse all step categories
Crypto Steps
/reference/steps/crypto
Encryption and hashing operations
API Steps
/reference/steps/api
HTTP requests and responses