katlab tools/json-escape

JSON Escape / Unescape

Type or paste in either pane — plain text becomes a JSON string literal on the right, escaped JSON becomes readable text on the left.

Everything runs locally in your browser. Nothing is sent to a server.
Plain text
JSON-escaped

How to escape or unescape a JSON string

  1. Paste plain text on the left — the JSON string literal appears on the right instantly. Paste an escaped string on the right and the readable text appears on the left.
  2. Toggle surrounding quotes depending on whether you need the full literal ("like this") or just the escaped body.
  3. Enable escape non-ASCII to force pure-ASCII output with \uXXXX sequences.

What JSON escaping actually requires

The JSON spec is stricter than most people remember. Inside a string, exactly three things must be escaped:

CharacterEscape
double quote "\"
backslash \\\
control chars < U+0020\n \t \r \b \f or \u00XX

Everything else — emoji, accented letters, CJK text — is allowed literally. Forward slashes may be written as \/ but never need to be; this tool leaves them plain.

The double-escaping trap

When a JSON document is stored as a string inside another JSON document (a webhook payload in a log field, an API response wrapped in an envelope), every backslash doubles: \" becomes \\\". To unwind it, unescape once, and if the result still contains \" sequences, run that result through again — each pass peels one layer. The unescape pane accepts input with or without the surrounding quotes.

Is anything uploaded?

No. Both directions run entirely in this page using the browser's own JSON engine, so the escaping rules are exactly the ones your code will apply. Logs and payloads never leave your machine.