Escape string
Description
This operation is used to encode or "escape" characters in a string so that they can be safely used in different contexts, such as URLs, JSON, HTML, or code. This operation is helpful when you need to format text with special characters in a way that won’t break syntax or cause unintended effects in various data formats.
Data types
These are the input/output expected data types for this operation:
Input data
- Strings with the characters you want to escape.
Output data
- Strings with the required escaped characters.
Parameters
These are the parameters you need to configure to use this operation (mandatory parameters are marked with a *):
Escape Level*
Choose how to control the extent of character escaping applied to the input. Select one of the following:
special chars - Escapes only a specific set of characters that have special meanings in the chosen format.
everything - Escapes all characters that could potentially have any impact in the selected format, including less common or optional characters.
minimal - Escapes only the characters that are strictly necessary to make the string safe for the specific format.
Check below some examples of different input messages and how they would be affected by each escape level option:
JSON – Special Characters Escape Level
In addition to the minimal set (", \, control characters), it may include:
Unicode characters (e.g.,
\u2028,\u2029)Any non-ASCII characters:
é,©, etc., escaped as\u00E9,\u00A9
jsonCopyEdit"message": "Caf\u00e9 \u00a9 2025"HTML – Special Characters Escape Level
In addition to minimal (<, >, &, ", '), it may escape:
All punctuation:
!,#,$,%,*,=,+,?,@Spaces: as
 or Non-breaking hyphens, dashes, etc.
htmlCopyEdit<p>10 × 20 = 200 €</p>XML – Special Characters Escape Level
Similar to HTML, with strong emphasis on:
All reserved XML chars:
&,<,>,',"Also can escape all non-ASCII and control characters (e.g.,
©for ©)
URI / URL Encoding
Escapes all characters except unreserved (
A-Z,a-z,0-9,-,_,.,~)Escaped using
%HHnotation (hex value)
perlCopyEditHello World! → Hello%20World%21JSON (Minimal Escape)
"(double quote) because it delimits strings\(backslash) because it’s used as an escape characterControl characters:
\b,\f, , ,
jsonCopyEdit{ "message": "He said: \"Hello!\"" }HTML (Minimal Escape)
<– to prevent tag injection>– to prevent broken tags&– to prevent character entity confusion"– if used inside attribute values wrapped in double quotes'– if used inside attribute values wrapped in single quotes
htmlCopyEdit<a href="page.html?msg=Hello & Welcome">Link</a>XML (Minimal Escape)
<,>,&,',"– for both content and attribute values
Escape Quote*
This parameter lets you specify how to handle quote characters (" and ') within the input text. Enter one of the following:
single - Escapes only single quotes (
') in the input.double - Escapes only double quotes (
") in the input.backtick - Escapes only backticks (
`) in the input.
JSON compatible
Set this parameter to true if you need to use the output string in a JSON. This ensures that any characters with special meanings in JSON are escaped properly, allowing the resulting string to be safely embedded in JSON objects or arrays.
Example
Suppose you want to escape characters that are between " in a series of input strings. To do it:
In your Pipeline, open the required Action configuration and select the input Field.
In the Operation field, choose Escape String.
Set Escape Level to
special chars.Set Escape Quote to
double.Set JSON compatible to
false.Give your Output field a name and click Save. Matching characters will be escaped. For example:
You can try out operations with specific values using the Input field above the operation. You can enter the value in the example above and check the result in the Output field.
Last updated
Was this helpful?

