JSON Escape and Unescape
Encode or decode JSON string values.
How to use
- 1 Choose Escape to encode text, or Unescape to decode a JSON string.
- 2 Paste your text or escaped string into the input box.
- 3 Read the converted result in the output panel.
- 4 Copy the output for use in your JSON or code.
About JSON Escape and Unescape
JSON Escape and Unescape converts text to and from the form it must take inside a JSON string value.
When you escape, the tool takes your raw text — including awkward characters like double quotes, backslashes, tabs and newlines — and produces the exact sequence you can paste between quotes in a JSON document without breaking it.
Newlines become \n, tabs become \t, quotes become \", and so on, so the value stays valid wherever you embed it.
The unescape direction does the reverse.
Paste in an escaped JSON string body and the tool decodes the escape sequences back into the original characters, including Unicode \uXXXX references, giving you readable plain text again.
This is invaluable when you are reading a minified config, copying a string out of an API response, or debugging a payload where everything has been collapsed onto one line with escapes.
If the input is not a well-formed JSON string, the tool tells you instead of guessing.
Both directions run entirely in your browser with no network requests, so your data never leaves your machine and the tool works offline.
It pairs naturally with formatters and validators in any JSON workflow, helping you move cleanly between human-readable text and machine-safe string literals.
FAQ
Do I include the surrounding quotes?
No. Provide just the string contents. Escape gives you the value to place between quotes, and unescape expects the value without its outer quotes.
What happens with invalid input when unescaping?
If the text is not a valid JSON-escaped string — for example a dangling backslash or an unescaped quote — the tool shows a clear error rather than producing wrong output.