Developer

JSON Escape / Unescape

Turn any text — with quotes, newlines, tabs or unicode — into a safely escaped JSON string, or paste an escaped JSON string and get the original text back. Instant, correct, and fully private in your browser.

Examples

Input · Escaped
She said "hi"
on two lines
Output
She said \"hi\"\non two lines

How it works

Escape passes your text through JSON’s own string encoder, so the result is exactly what a JSON parser expects between two quotes. You choose whether the surrounding quotes are included.

What gets escaped
CharacterWritten as
Double quote\"
Backslash\\
Line break\n
Tab\t

Accented letters, non-Latin scripts and emoji are left as they are, since JSON allows them unescaped. Unescape accepts input with or without the outer quotes and also reads \uXXXX sequences. It fails when the text contains a bare double quote or a backslash that does not start a valid escape.

How to use JSON Escape / Unescape

Paste your text
Add the raw text to escape, or the escaped JSON string to decode.
Choose direction
Toggle between Escape and Unescape.
Copy output
Grab the converted result with one click.

Why use this tool

Escapes quotes, backslashes, newlines, tabs and control characters
Uses the JSON standard exactly (via JSON.stringify / JSON.parse)
Optional surrounding quotes on escaped output
Instant and fully private

Frequently asked questions

Whenever you embed text inside a JSON string by hand — in config files, API request bodies, code generators or log pipelines — special characters like quotes and newlines must be escaped.

Yes. Escaping follows the JSON specification, so emoji and non-Latin scripts round-trip correctly. Control characters become \uXXXX sequences.

Found a bug or have an idea?

ToolOrbit is actively developed — feedback directly shapes what gets built next.

Send feedback