JSON String Escape / Unescape

Turn any text into a valid JSON string literal — or decode one back, \n, \", é and all.

What gets escaped

JSON requires escaping the double quote (\"), backslash (\\) and control characters — newline \n, tab \t, carriage return \r and the rest as \u00XX. Everything else, including emoji and accents, is legal as-is; tick "escape non-ASCII" if the destination system mangles UTF-8.

Frequently asked questions

When do I need this?

Whenever text goes inside hand-written JSON: pasting a multi-line prompt into an API request body, embedding an error message in a config value, or writing test fixtures. One raw newline makes the whole document invalid.

Escape vs stringify — what's the difference?

Escaping produces the contents of a string literal; stringify wraps it in quotes too. The "wrap result in quotes" option gives you the full literal, ready to paste after a colon.

Why does unescape reject my input?

The input must be a valid JSON string body — a lone \ or an unpaired surrogate fails. Surrounding quotes, if present, are stripped automatically first.

Last updated: 2026-07-13