Decode a JSON string literal into readable text
JSON Escape
Paste a paragraph, a file path or a code snippet and get a string you can drop into JSON without breaking it.
Loading tool…
How to use json escape
Type or paste the text, line breaks and quotes included.
Choose whether to wrap it in quotes.
Turn on \u escapes for non-ASCII or \/ for slashes if your system needs them.
Copy the escaped string.
What this tool does
- Escapes quotes, backslashes, line breaks, tabs and every control character the JSON standard requires.
- Optional ASCII-only output, with emoji written as surrogate pairs.
- Optional \/ escaping for embedding JSON inside an HTML script tag.
- Shows character counts before and after.
How the result is verified
The escaped output is parsed with the browser's JSON reader and must give back your exact text before the tick appears.
Frequently asked questions
Should I include the surrounding quotes?
Keep them on when you paste a whole value into JSON. Turn them off when your template already has the quotes around the placeholder.
Why escape a forward slash?
It is optional in JSON. It only matters when JSON sits inside an HTML script tag, where a closing script tag inside a string could end the block early.
Is my data uploaded to a server?
No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.
Related tools
Beautify or minify JSON with your choice of indentation
Find JSON syntax errors with the exact line and column
Readable YAML from JSON, with ambiguous values quoted safely