Skip to main content
Convert2JSON
JSON ToolsBrowser processing

JSON Unescape

Turn an escaped fragment full of backslash sequences back into the plain text it represents.

Input

Escaped
characters
0
lines
0
size
0 B
Your data stays on your device.Parsing, conversion and code generation happen in this browser. Input is not uploaded to Convert2JSON servers.Privacy policy

About this tool

Text pulled out of a JSON string often still contains its escape sequences: \n for newlines, \t for tabs, \" for quotes and \\ for backslashes. This tool resolves those sequences into the characters they stand for.

It is the inverse of JSON Escape. Feed it the content between the quotes of a JSON string and it returns the readable original.

How to use this tool

  1. Paste the escaped fragment (the content inside a JSON string).

  2. Press Unescape to resolve the escape sequences.

  3. Read or copy the plain-text result.

  4. Use JSON Escape to reverse it if needed.

Key features

  • Resolves \n, \t, \r, \", \\ and \uXXXX sequences
  • Clear error on an invalid escape sequence
  • Reversible with JSON Escape
  • Unicode-aware decoding
  • Processed locally in the browser

Example

Escape sequences become characters

InputText

Line 1\nLine 2\tEnd \"quote\"

OutputText

Line 1
Line 2	End "quote"

Good to know

  • Do not include the surrounding quotes; paste only the fragment. Use JSON Unstringify for a full quoted literal.
  • An invalid escape sequence stops decoding and is reported rather than guessed.

Frequently asked questions

What is the difference from Unstringify?

Unescape works on the fragment inside the quotes. Unstringify expects the whole quoted literal and returns a parsed JSON value.

It says the escape is invalid — why?

JSON only permits a fixed set of escapes. A stray backslash, or \x style sequences, are not valid and are reported.

Is my text uploaded?

No. Decoding happens in your browser.

Further reading

JSON escape characters Eight escape sequences plus \uXXXX. Everything else after a backslash is a syntax error.

Your data stays on your device

Your data is processed locally in your browser and is not uploaded to our server. This page keeps working after you go offline, because there is nothing to send.