▤Free
JSON string escape and unescape
Convert plain text to a JSON string literal or decode one.
Convert plain text to a JSON string literal or decode one. Encode newlines, quotes and other characters as a JSON string, or decode a string literal back to text. Escape mode includes surrounding quotes; decode mode requires a string value.
How to use
- Enter your text, values, or image.
- Adjust the options and run the tool.
- Copy or download your result.
Worked example
Example input
Input: a b Direction: escape
Example result
"a\nb"
Limitations and details
Decode mode does not accept objects or arrays; this is JSON string escaping, not HTML escaping or URL encoding.
Inputs and options
- Input
- Text
- Direction
- Escape / Unescape
Frequently asked questions
Is this tool free and private?
Yes. All 300 tools are free in this phase. Processing happens in your browser; your input and files are not sent to our servers.