JSON Escape & Unescape

Convert JSON to and from an escaped string. Private, in your browser.

Input

Output

Ready
Ln 1, Col 1

Escape JSON as a string, or unescape it back

Escaping turns a JSON document into a single string literal, with quotes and backslashes escaped, ready to embed in source code, a log message or another JSON field. Unescaping does the reverse: paste a string like "{\"a\":1}" and choose Unescape string to see the JSON inside.

How to use it

  1. Paste JSON into the Input panel. The escaped string appears in the output.
  2. To reverse it, paste an escaped string and choose Convert → Unescape string.
  3. Copy or download the result.

Escaping rules

  • Double quotes become \" and backslashes become \\.
  • Line breaks, tabs and control characters are written as \n, \t and \uXXXX.
  • The output is minified first, so it fits on one line.
  • When you format a value that is itself a JSON string, the tool offers to unescape it automatically.

More JSON tools

All tools are free and run privately in your browser.

JSON Escape FAQ

What does it mean to stringify JSON?

Stringifying converts a JSON value into a string literal, so it can be stored inside another JSON document or source code. It is what JSON.stringify(JSON.stringify(value)) produces.

How do I unescape a JSON string?

Paste the escaped string, including its surrounding quotes, and choose Convert → Unescape string. The JSON inside is parsed and formatted.

Is my data uploaded to a server?

No. The JSON Escape runs entirely in your browser using JavaScript. Your data is never uploaded, logged or stored, and the tool keeps working offline after your first visit.