100% client-side · nothing leaves your browser

JSON Escape / Unescape

Escape raw text so it's safe to embed inside JSON, or unescape a JSON string literal back to its original text.

Input
Output

          
Paste text to escape or unescape it

Frequently asked questions

What characters need escaping in a JSON string?

Double quotes, backslashes, and control characters like newlines and tabs all need escaping in JSON strings — e.g. a literal quote becomes \", and a newline becomes \n.

When would I need to unescape a string?

When you have a JSON string literal — for example, copied from a log file or source code — and want to see or use its actual, unescaped text content.