Skip to content

Unescape a JSON string

Turn an escaped JSON string back into readable text: \" becomes ", \n becomes a real line break, and \uXXXX becomes the character it names.

  • Runs in your browser
  • Nothing you enter is sent
  • Free, no account
Unescape JSON
Reverse an escaped string: turn \" back into ", \n back into a real newline, and \uXXXX back into the character.
Your JSON never leaves this tab — check it yourself—

Starting the network probe…

The counter above wraps fetch, XMLHttpRequest and navigator.sendBeacon in this tab and counts every call. It does not block anything — it just reports.

Two ways to verify independently

  1. Turn off Wi-Fi or enable airplane mode, then use the tool. It keeps working, because the page is already fully loaded.
  2. Open your browser devtools, switch to the Network tab, clear it, and run the tool. No new row appears.

Why this matters

In 2025 researchers found that popular online formatters had retained tens of thousands of user-submitted snippets — JSONFormatter.org and CodeBeautify together exposed roughly 80,000 saved documents, many containing live cloud credentials, private keys and internal database connection strings, because “format this” quietly meant “upload this”. A separate incident exposed roughly 3.5 million user PDFs on a document-conversion service. The only structural fix is not sending the data in the first place: this site is served under a Content-Security-Policy whose connect-src contains no third-party origin, so a request off this device cannot be made even by accident.

Turning an escaped string back into text

Paste an escaped JSON string and this returns the characters it stood for: \" becomes a quote, \n becomes a real line break, \t becomes a tab, and \uXXXX becomes the character at that codepoint. The surrounding double quotes are optional — if you leave them off, they are added before parsing.

The three errors you will actually hit

A lone backslash

In JSON, a backslash always begins an escape sequence. A Windows path pasted raw — C:\Users\me — reads as “escape U, escape m”, neither of which exists. The fix is to double every backslash in the source that produced the string. This is the single most common cause of an unparseable escaped string.

An unterminated string

Usually a copy-paste that stopped short, or a quote inside the string that was never escaped so the parser thought the string ended early and then found garbage. Check that the number of unescaped quotes is exactly two.

A short \u escape

\u must be followed by exactly four hexadecimal digits. \u41 is invalid even though 41 is a valid hex byte — it needs to be \u0041.

Double-escaped text

If unescaping once produces text that still contains \" and \n, the value was escaped twice. That happens when a client serialises an object to a string and then a framework serialises the whole request again, or when a log line records an already-serialised payload. Run the unescape a second time to read it — then find the layer doing the redundant escaping, because double-escaped data will eventually be double-unescaped by something that should not.

Characters outside the Basic Multilingual Plane

JSON escapes characters above U+FFFF as a surrogate pair: two \u escapes that combine into one character. An emoji such as 🎉 is \ud83c\udf89. The unescape reassembles the pair correctly, so emoji, rare CJK ideographs and mathematical alphanumerics all come back whole rather than as two replacement characters.

What to do with the result

If the unescaped text is itself a JSON document — the usual case when you are digging a payload out of a log — send it straight to the JSON validator to format and check it. If it is plain text with newlines, it is now ready to read or to save. Either way, re-escape before writing it back into a JSON field: unescaped text is not safe to paste into a JSON document.

Questions

What can I paste here?

Either a complete JSON string literal including its surrounding double quotes, or just the escaped body without them — the tool adds the quotes for you. If the result is itself a JSON document, send it to the validator to format it.

Why does it say my string is not valid?

Almost always a lone backslash. In a JSON string, a literal backslash must be written as two backslashes, so a Windows path pasted raw (C:\Users\me) is invalid. The error also fires on an unterminated string and on a \u escape without four hex digits.

It says "that parsed to a JSON value, not a string" — what now?

You pasted a JSON object or array rather than an escaped string. That is not something to unescape; use the JSON validator or formatter instead.

Does it decode \u escapes outside the Basic Multilingual Plane?

Yes. Characters above U+FFFF are encoded in JSON as a surrogate pair of two \u escapes, and the pair reassembles into the correct character — emoji included.