JSON Toolsavailable

JSON Escape / Unescape

Escape JSON strings or restore their readable characters.

Text

Enter plain text. Output is JSON string content without surrounding quotes.

Escaped JSON string contentRead-only

Conversion output appears here.

Read-only output remains selectable and can be copied manually.

Options

Operation

Non-ASCII and forward-slash options apply when escaping. Escaping / is valid JSON but is usually unnecessary.

Your text stays in your browser.

Nothing you enter is uploaded or automatically saved. No logging or network calls are involved.

Statistics

Input: 0 characters · 0 lines

Output: 0 characters · 0 lines

Escape sequences: 0 · Unicode escapes: 0

UTF-8 bytes: 0 B input · 0 B output

What JSON escaping means

JSON strings use backslashes to represent quotes, backslashes, and control characters. A real newline is a line break; the two characters \n represent its JSON escape. This tool works on string content, so it does not add surrounding quotes.

Unicode escapes and surrogate pairs

A \uXXXX escape represents one UTF-16 code unit. Accented text can use one escape, while an emoji such as 🚀 uses two escapes: \uD83D\uDE80. The tool validates those pairs, preserves combining characters, and never normalizes your text.

Not URL or HTML encoding

JSON escaping is for JSON string syntax. It is different from URL percent encoding and HTML entity encoding, which use different rules and should be selected only for their respective contexts.

Frequently asked questions

Why are quotes escaped?

A quote ends a JSON string, so a quote that belongs in the string must be written as \".

What is the difference between \n and a real newline?

A real newline moves to the next line. The characters backslash and n are the JSON notation that represents one newline.

Why does emoji become two Unicode escapes?

JSON \uXXXX escapes encode UTF-16 units. Most emoji need a high and low surrogate pair.

Is escaping forward slash required?

No. \/ is valid JSON, but / is normally safe to leave unescaped.

Why does \u{...} not work in JSON?

That is JavaScript syntax. JSON permits only classic four-digit \uXXXX escapes.

Practical guide

When to use it

Use it when a piece of text must become the contents of a JSON string, or when an escaped JSON string needs to be read normally.

Three steps

  1. Choose Escape for plain text or Unescape for a JSON string value.
  2. Paste the string content, not an entire JSON document.
  3. Convert and copy the result into the surrounding JSON where needed.

Example and a common mistake

A message containing a quote and a newline becomes "She said \"hello\"\n" inside a JSON string.

JSON escaping is different from URL encoding and HTML escaping; choose the encoding required by the destination.

JSON

Available

JSON Formatter

Format, validate, minify, and sort JSON locally.

JSON

Available

JSON Minifier

Remove nonessential whitespace from JSON documents.

JSON

Available

JSON Validator

Check JSON syntax and pinpoint invalid data.