How to use this tool
Escape uses JSON.stringify and includes the surrounding double quotes. Unescape uses JSON.parse and requires the result to be a string. It handles JSON escapes, not HTML entities, URL escapes or arbitrary JavaScript expressions. Output is displayed as plain text.
Try these values
A real line break becomes \n inside the escaped JSON string. To unescape, include both surrounding double quotes.
Common questions
Does my input leave this page?
The tool processes its input in your browser. It does not send the text to our server for calculation. If advertising is enabled, third-party ad scripts also run on the page; use a trusted offline tool for secrets.
Can I use the result in my project?
Yes. Check the example and limitations first, and test the output with the system that will consume it.
Something doesn’t add up? Report an issue · Methods & corrections