JSON Escape / Unescape
Turn JSON into an escaped string, or paste a string full of \" to get readable JSON back. Runs in your browser.
Embed JSON anywhere, read escaped JSON instantly
For payloads inside payloads: webhook bodies, log lines, env vars, test fixtures and API fields that hold JSON as text.
- Two directions
- Escape text or JSON into a string literal, or Unescape it back. Switching takes the result with it, so you can round-trip.
- Double-escaped? Handled
- Strings escaped two or more times (
\\\") are unwrapped in one step, and the count is shown. - Formatted result
- When the unescaped text is JSON it is pretty-printed, ready to read or paste into the formatter.
- Exact numbers
- 64-bit IDs such as 9007199254740993 stay exact when JSON is minified before escaping.
- With or without quotes
- Keep the outer double quotes, or drop them when the string goes inside quotes you already have.
- Private
- Nothing is uploaded. Works offline, no sign-up.
Frequently asked questions
What does escaping JSON mean?+
It turns JSON (or any text) into a JSON string value: double quotes become \", backslashes become \\, and line breaks become \n. You need it to put a JSON document inside another JSON field, an environment variable, a test fixture or a log message.
How do I unescape a JSON string?+
Choose Unescape and paste the string — with or without its outer quotes. CurlyJSON removes the escaping, and if the result is JSON it is formatted so you can read it. Strings escaped twice or more are unwrapped in one go.
Why does my log show JSON full of backslashes?+
The JSON was stored as a string inside another JSON document (common in CloudWatch, Elasticsearch, Kafka messages and webhook payloads). Paste it into Unescape to get the original document back.
Is this the same as JSON.stringify?+
Escape gives the same result as JSON.stringify(text) in JavaScript, and Unescape the same as JSON.parse. With Minify JSON first on, the JSON is compacted before escaping, like JSON.stringify(JSON.stringify(data)).
Is my data uploaded?+
No. Escaping and unescaping run in your browser and work offline. Your last input is remembered on this device only; Clear removes it.