What is the JSON Escape / Unescape?
Inside a JSON string, some characters must be escaped with a backslash: double quotes become \", backslashes become \\, and line breaks become \n. Forgetting this is a classic cause of "Unexpected token" errors, for example when you put a SQL query, an HTML snippet or a whole JSON document inside another JSON value.
This JSON escape tool escapes any text correctly, and unescapes strings copied from logs or API responses (like {\"id\":1}) back into readable text. Everything runs in your browser.
How to use the JSON Escape / Unescape
- Paste your text or escaped string.
- Click Escape to make it safe for a JSON string, or Unescape to decode it.
- Optionally wrap the result in quotes or escape all non-ASCII characters.
- Copy the output.
Frequently asked questions
Which characters must be escaped in JSON?
The double quote, the backslash and control characters (code points below U+0020), such as newline, carriage return and tab. Everything else, including emoji, may appear as is. A forward slash may be escaped but does not have to be.
How do I embed JSON inside a JSON string?
Escape the inner JSON with this tool and place the result inside double quotes as a string value. To read it back, unescape it and parse it again.
What does \u00e9 mean?
It is a Unicode escape: \u followed by four hex digits. \u00e9 is é. Characters outside the Basic Multilingual Plane, like most emoji, use two escapes called a surrogate pair.