JSON Escape / Unescape
Escape text for safe embedding inside JSON strings, or decode escaped JSON strings back to readable text.
This tool runs 100% in your browser. Your data is never uploaded, stored, or logged.
Result
About this tool
Embedding text inside a JSON string means escaping quotes, backslashes, newlines and control characters — get one wrong and the whole document fails to parse. This tool escapes and unescapes JSON strings exactly the way JSON.stringify and JSON.parse do.
Paste raw text to escape it, or paste an escaped string to see the original.
How to use it
- Choose Escape or Unescape.
- Paste your text — results appear instantly.
- Tick Wrap result in quotes if you need a complete JSON string literal.
- Copy the result.
Useful ways to apply it
- Putting multi-line text or code snippets into a JSON config value.
- Decoding \n and \" sequences from API logs into readable text.
- Preparing strings for hand-written JSON payloads in tests.
- Fixing double-escaped strings from chained systems.
Frequently asked questions
Which characters get escaped?
Quotes, backslashes, forward-slash-free control characters, newlines (\n), tabs (\t), carriage returns (\r) and other characters below U+0020 — identical to JSON.stringify behavior.
Why does my unescape fail?
The input must be a valid JSON-escaped string. A common cause is a lone backslash that is not part of a valid escape sequence.
Does it handle Unicode?
Yes. \uXXXX sequences decode correctly, and non-ASCII characters pass through untouched when escaping.
Privacy
This tool runs 100% in your browser. Your data is never uploaded, stored, or logged.