Actions22
- Tool Actions
- Other Tool Actions
- Date Operation Actions
- Text & Formatting Actions
Text & Formatting → Decode String
AI-generatedOverview
The "Decode String" operation in the "Text & Formatting" resource is designed to decode URL-encoded strings, specifically handling Hebrew or other encoded text. This node takes an input string that has been URL-encoded and attempts to decode it back to its original readable form.
This operation is useful in scenarios where data received from web requests, APIs, or other sources is URL-encoded (e.g., spaces replaced by %20, special characters encoded) and needs to be converted back for further processing or display. For example, decoding query parameters or form data that include Hebrew characters or other non-ASCII symbols.
Practical examples:
- Decoding a URL-encoded Hebrew string received from a web form submission.
- Converting encoded query parameters into human-readable text before logging or analysis.
- Preparing encoded strings for display in user interfaces or reports.
Properties
| Name | Meaning |
|---|---|
| Encoded String | URL-encoded string to decode |
The only required property is the Encoded String, which should contain the URL-encoded text you want to decode.
Output
The output JSON object contains the following fields:
originalString: The original input string as provided.decodedString: The decoded version of the input string after applying URL decoding.wasDecoded: A boolean indicating whether decoding actually changed the string (true if decoded string differs from original).encodingType: Indicates the type of encoding detected and used for decoding; here it will be"URL"if decoding was applied, otherwise"None".
Example output JSON:
{
"originalString": "%D7%A9%D7%9C%D7%95%D7%9D",
"decodedString": "שלום",
"wasDecoded": true,
"encodingType": "URL"
}
No binary data output is produced by this operation.
Dependencies
- No external services or API keys are required.
- The operation relies on JavaScript's built-in
decodeURIComponentfunction for decoding. - No special environment variables or n8n credentials are needed.
Troubleshooting
Common issues:
- Input string is not properly URL-encoded or contains invalid escape sequences, causing decoding to fail.
- Empty or missing input string results in no meaningful output.
Error messages:
"Failed to decode string": Thrown when the decoding process encounters an error, likely due to malformed input. To resolve, ensure the input string is correctly URL-encoded.
If the input string is already decoded or does not require decoding, the node will return the original string with
wasDecodedset to false.