JSON UnescapeONLINE

Decode a quoted JSON string into its raw text value.

1 MiB per input · Ctrl / ⌘ + Enter to run

Input must be exactly one JSON string value. The output is plain text and may contain literal line breaks.

Result
Ready. Paste input, then run the tool.
Your JSON stays in your browser. Core processing happens locally.
THE PRACTICAL GUIDE

Turn a quoted JSON string back into plain text

JSON Unescape decodes one quoted JSON string literal into its plain text value. It is useful when logs or APIs show backslash escapes instead of visible characters.

When should you use it?

  • Read a string containing escaped newlines.
  • Inspect escaped quotes or Unicode sequences.
  • Recover raw text from a JSON string field.
WORKED EXAMPLE

Example: turn an escape into a line break

The two-character backslash-n sequence becomes a real newline in the output text.

Quoted JSON string
"Hello\nworld"
Plain-text output
Hello
world

Read escapes as source syntax

In a JSON string, \n represents a newline and \" represents a quote. Decoding replaces those source escapes with their corresponding characters. The input needs its enclosing double quotes because they identify one complete JSON string value. A string copied from a programming-language literal may have an additional escaping layer, so identify what was actually copied.

Choose plain text or a nested JSON document

Unescape can return a message, a path, or any other text; it does not require the decoded text to be JSON. If the outer string contains an encoded JSON document and you want that inner document validated too, use Unstringify. Do not remove backslashes manually: a backslash can encode a quote, a control character, Unicode, or another literal backslash.

IN PRACTICE

How do I turn a quoted JSON string with \n into real text?

Paste one valid JSON string literal, including the outer double quotes. Unescape interprets sequences such as \n, \t, and escaped quotes and returns plain text. It is helpful when log output shows literal backslashes instead of readable line breaks.

Quoted input and plain-text output

text
Input:  "first\nsecond"
Output: first
        second

The output contains an actual line break. If you need a valid JSON string again, run JSON Escape on the plain text.

No. The input must be exactly one quoted JSON string. Use JSON Unstringify when that string contains another complete JSON document.

BEFORE YOU USE THE RESULT

What should you check before using the result?

The result is no longer a JSON string literal. To place it back into JSON safely, use JSON Escape; to decode a string containing a whole JSON document, use JSON Unstringify.

Understand JSON syntax

Technical reference: JSON syntax and interoperability · RFC 8259

THE JSON FIELD GUIDE
All guides