JSON String Unescape

Turn an escaped JSON string back into readable text. Sequences such as \n, \" and \uXXXX are decoded, and surrounding quotes are removed if present.

Use the tool

Why this tool exists

Log files, API responses and database exports often show text as one escaped line full of backslashes. A stack trace, an HTML email or a SQL query stored in a JSON field is nearly impossible to read like that. You see \n where you want a line break and \u00e9 where you want an accented letter.

Paste the escaped value and the tool decodes it into the original text, line breaks included. You can paste it with or without the surrounding quotes. Unlike a strict JSON parser, it does not insist on a complete valid document, so a fragment copied from the middle of a log line works. The decoding happens in your browser and nothing you paste is uploaded.

How to use it

  1. Paste the escaped string, with or without its surrounding quotes.
  2. Read the decoded text in the output, with real line breaks and characters.
  3. Copy the plain text for your editor, ticket or report.

Frequently asked questions

Which escape sequences are decoded?

The common ones: \n, \t, \r, \b, \f, \/, \\, \" and \uXXXX. Unknown sequences are left as they are rather than causing an error.

Do I need to include the quotes?

No. If the text starts and ends with a double quote, those are stripped. Otherwise the whole input is decoded as it is, which suits fragments copied from logs.

What about emoji written as two \u sequences?

A surrogate pair such as \ud83d\ude00 is decoded into the single emoji it represents, because both halves are converted and join up in the result.

Can it decode a full JSON document?

It is meant for single string values. For a whole document use the JSON formatter or validator, which parse and display the structure.