Developer Tools
Free Online JSON Escape / Unescape Tool
Paste text or a string to escape it for safe use inside a JSON value, or paste an escaped JSON string to unescape it back to readable text.
How to use the jSON Escape / Unescape
- Paste plain text or an already-escaped JSON string into the input box.
- Click 'Escape' to make it safe for embedding inside a JSON string value, or 'Unescape' to reverse it.
- Review the result.
- Copy it into your JSON payload or code.
Example
Escaping a string containing a quote and newline, like He said "hi" followed by a line break, produces He said \"hi\"\n — safe to place inside a JSON string value.
Why escape strings for JSON?
JSON strings can't contain raw quotes, backslashes, or unescaped control characters like newlines. Escaping converts these into safe sequences so the string can be embedded directly into JSON without breaking parsing.
Two-way conversion
This tool both escapes readable text for safe JSON embedding and unescapes existing JSON string content back into its original readable form.
Frequently asked questions
Quotes, backslashes, and control characters like newlines and tabs are converted into their JSON escape sequences, such as \n, \", and \\.
No, the Formatter validates and pretty-prints a full JSON document; this tool escapes or unescapes a single string value.
Yes, Unicode characters are preserved and don't require escaping unless they're control characters.
No, escaping and unescaping happen entirely in your browser.