JSON escape and unescape
Convert text with line breaks, quotes or backslashes into a safe JSON string, or recover the original text.
It works in your browser. We do not store or send anything you type.·Free · No sign-up required
Workspace · JSON escape and unescape
Runs in your browser · 100% local
Output
Files are processed in your browser; if you are signed in with history enabled, text results appear in your history.
Instructions
How to use it
01
Choose “Escape” or “Unescape”.
02
Paste the text and check the result.
03
Copy or download the output.
Examples
Examples
Escape
A line with "quotes" and a break becomes an escaped JSON string.
Unescape
\\n and \\t become a line break and a tab again.
Reference guide
What you need to know
Escaping uses JSON.stringify, so the output can be pasted inside a JSON value. Unescaping parses the string with JSON.parse and shows the resulting text, including Unicode escapes.
Frequently asked questions
Frequently Asked Questions
Yes, they are preserved and escaped as Unicode when needed.
Related tools
Other tools that can help with similar tasks.
#18BetaWeb development
JSON formatter and validator
Formats, validates and organises JSON with error detection.
Open→Free · No sign-up requiredHistory
#28Web development
JSON validator
Check whether a JSON document is valid, locate the error and inspect its structure.
Open→Free · No sign-up requiredHistory
BetaText
HTML encoder and decoder
Escape special characters for HTML and restore the original text.
Open→Free · No sign-up requiredHistory
