99digest is in early access — tools are free while we grow.

JSON Escape/Unescape

Escape a raw string for embedding inside a JSON string literal, or unescape one back to plain text — instantly, in your browser.

Runs in your browser Private & secure
Read the guide →

Escape text so it can sit inside a JSON string, or unescape an escaped string back to plain text. It runs in your browser.

Runs in your browser

How to use it

  1. Choose escape or unescape.
  2. Paste the text.
  3. Copy the result.

What is escaped

A double quote becomes \", a backslash \\, a new line \n and a tab \t. For example She said "hi", a line break and new line\path become She said \"hi\"\nnew line\\path.

Good to know

The result has no surrounding quotation marks, so add them yourself when you build the document. If you unescape text that is not validly escaped, such as a lone backslash, the tool explains what is wrong. Do not escape text that is already escaped, which doubles every backslash. Non-English characters do not need escaping because JSON supports Unicode.

See the escaping guide and check the finished document with the JSON Validator.

FAQs

Is \/ required for a forward slash?

No. It is allowed but not needed.

Why do my logs show backslashes before every quote?

The JSON string was escaped twice. Unescape it once to see the original.