Free Online JSON String Escaper and Unescaper
Escape any text so it can be dropped inside a JSON string, or take an escaped string and turn it back into plain readable text, all in your browser. Quotes, backslashes, line breaks and tabs are handled properly, characters outside plain ASCII can be written as escapes, and the result can be wrapped in quotes ready to paste.
Enjoying WizTools123? Help keep our server infrastructure 100% free and open for everyone.
How to Escape Text For JSON
A few steps, and nothing is uploaded.
What to Know About Escaping For JSON
What must be escaped, what may be, and what must not.
Key Features & Capabilities
What this tool does, and what it deliberately does not.
About the JSON String Escaper
Putting text inside a JSON string is one of those jobs that looks trivial until a quotation mark ruins an afternoon. A Windows file path has backslashes that mean something else. A quoted sentence closes the string early. A pasted paragraph has line breaks that JSON does not allow inside a string at all. Each of those produces a parse error several lines away from the real problem.
This page is deliberately smaller than a JSON formatter. It does not care about your objects, your arrays or your indentation. It takes one piece of text and makes it safe to live inside a pair of double quotes, which is the specific thing a formatter cannot help with because the text is not valid JSON yet.
The unescape direction gets used more than people expect. Logs, error messages and configuration files are full of strings that have been escaped once or twice, and reading a Windows path with four backslashes in it is genuinely hard. Turning it back into plain text takes a second and often shows immediately what is wrong.
Frequently Asked Questions
Quotes, slashes, unicode escapes and single quotes.