JSON Unescape

Paste a JSON string full of \n, \" and \u escapes, from a log line or an API response, and read it as the plain text it stands for.

How it works

The tool reads every escape JSON defines: \" \\ \/ \b \f \n \r \t and \u followed by four hex digits. Each becomes the character it stands for. Everything else is copied as it is.

You can paste the whole string with its surrounding double quotes, or only the inside. If the text starts and ends with a double quote, those two are removed; a quote in the middle is kept.

An escape JSON does not allow, such as \x41 or a \u with fewer than four hex digits, stops the tool with the line, column and a plain explanation. It all runs in this page.

How to use it

  1. 1 Copy the string from your log, response or file. Its quotes can come along or stay behind.
  2. 2 Paste it into the first box.
  3. 3 Read the plain text in the second box, with real line breaks and quotes.
  4. 4 Press Copy result, or download it as a .txt file.

Good to know

  • A stack trace or SQL query logged as JSON is often one long line full of \n. Unescaping it gives back the original lines.
  • If a string was escaped twice, you will see \\n where you expect \n. Run the result through the tool a second time.
  • Two \u escapes in a row, such as \ud83d\ude00, are one emoji. They are joined back into a single character.
  • To go the other way, paste plain text into JSON Escape.

Browser support

  • Chrome 94 and later
  • Firefox 93 and later
  • Safari 16.4 and later
  • Edge 94 and later

These are the oldest versions with everything the tool uses. They are worked out from the tool itself, so they change when it does.

Version numbers checked on 2026-09-04.

Reading escaped JSON strings from logs and APIs

Structured logs, error trackers and APIs often hand you text inside a JSON string. A three-line error message comes out as one long line with \n where the breaks should be. An HTML snippet arrives with \" around every attribute. A name such as José appears as Jos\u00e9. All of this is correct JSON: inside a string, a line break, a double quote and a backslash have to be escaped, and any character may be written as \u with its four-digit hex code. It is correct, but hard for a person to read.

Unescaping reverses it. The tool walks through the text and replaces each escape with the character it stands for: \n with a line break, \t with a tab, \" with a quote, \\ with a single backslash, \/ with a slash, and \u00e9 with é. The rare \b and \f become backspace and form feed. Text without a backslash is copied as it is, so a long log message comes back exactly as it was before it was escaped.

You can paste the string with or without its outer quotes. When the pasted text, ignoring spaces at the ends, starts and ends with a double quote, the tool treats those two as the string's own delimiters and drops them. A quote anywhere else is kept, because text copied out of a log often has bare quotes in it that are part of the message.

Emoji and other characters beyond the first 65,536 are written in JSON as two \u escapes, a surrogate pair such as \ud83d\ude00. The tool turns each escape into its UTF-16 code unit and the pair joins back into one emoji, just as a JSON parser does. If a string was escaped twice, which happens when JSON is stored inside another JSON string, the first pass leaves \n and \" behind. Run the result through again to reach the plain text.

Some escapes are not JSON at all. \x41 comes from JavaScript and Python, \a and \e come from C and shells, and \' is how many languages escape a single quote. A strict JSON reader rejects them, and so does this tool: it stops at the first one and says which line and column it is on and which escapes JSON allows. Everything runs in your browser, so private log lines and payloads stay on your machine.

Frequently asked questions

Why do I see \n instead of line breaks in my JSON?

A JSON string cannot contain a raw line break, so a writer replaces each one with \n. That is correct JSON. To read the text as it was meant, unescape it here, or read the value with a JSON parser in your code.

Do I need to remove the quotes first?

No. If the text starts and ends with a double quote, the tool treats those as the string's own quotes and removes them. If not, it unescapes the text as it is.

What does "not a valid escape in JSON" mean?

JSON allows only a short list of escapes after a backslash. Others, such as \x41, \a or \', come from other languages. The message gives the line and column of the backslash so you can fix or remove it.

Is the text uploaded?

No. It is unescaped in this page and nothing is sent anywhere.

Related tools

Your files are processed on your device and are not uploaded. You can verify this in your browser’s developer tools under the Network tab.