Skip to content
DevTools

JSON Escape & Unescape String Online

Escape text for use inside a JSON string (quotes, backslashes, newlines, control characters) or unescape a JSON string back to plain text.

Input

Output

Ready

Runs locally in your browser — your data is never uploaded.

About the JSON Escape / Unescape

Escape text so it can be safely placed inside a JSON string: double quotes, backslashes, newlines, tabs and other control characters are converted to their escape sequences. Unescape does the reverse, turning \n, \" and \uXXXX sequences back into plain text.

It's handy when embedding JSON in JSON, writing test fixtures or reading escaped strings from logs.

How to use it

  1. Choose Escape or Unescape.
  2. Paste your text.
  3. Copy the result.

Features

  • Spec-compliant escaping
  • Unicode escape decoding
  • Accepts strings with or without surrounding quotes

Frequently asked questions

Which characters must be escaped in JSON?

Double quote, backslash and control characters U+0000 to U+001F. Forward slash and non-ASCII characters may be escaped but don't have to be.

Is my data uploaded anywhere?

No. All processing happens in JavaScript inside your browser tab. Your input is never sent to a server, logged or stored, so it is safe to use with internal or sensitive data.