JSON String Escape / Unescape

Convert text to a JSON string literal or decode a JSON string literal back to plain text in your browser.

Paste raw text to escape it as a JSON string literal, or paste an escaped JSON string literal to turn it back into plain text. Processing stays on this page.



How it works

Use escape mode to prepare text for a JSON string value, including quotes, backslashes, control characters, and line breaks.

Use unescape mode to turn a JSON string literal back into plain text. Leave quotes enabled for complete string literals such as "hello\nworld", and turn the option off only when you have the escaped body without the opening and closing quotes.

This tool handles JSON strings, not complete JSON objects or arrays. Use the JSON Formatter when you need to validate or format full JSON documents.

Forward slash escaping is optional in JSON, so it is off by default unless you need output compatible with codebases that prefer <\/script>-style escaping.

Input stays in the browser. Avoid pasting secrets unless you trust the current device and page context.


References