String Escape / Unescape
Safely escape or unescape text for JSON, JavaScript and CSV — quotes, newlines, tabs and control characters handled correctly.
Nothing to convert yet — enter some text above.
How it works
Pick a format and a direction — the result updates as you type. No button to press.
Choose a format
JSON, JavaScript or CSV — each has its own escaping rules for quotes and special characters.
Escape or unescape
Escape turns raw text into a safe literal; unescape turns an escaped literal back into raw text.
Copy or download
Grab the output with one tap, or download it as a text file — nothing is ever uploaded.
What each format does
JSON escaping produces the inner content of a JSON string: backslashes,
double quotes, newlines, tabs and control characters become \\,
\", \n, \t and \uXXXX sequences.
Unescaping reverses this, so you can read a value pulled straight out of a JSON payload.
JavaScript escaping targets a JS string literal. It escapes backslashes,
single, double and back quotes, newlines, tabs and other control characters (including the
line separators and that break inline scripts).
Unescaping decodes \n, \t, \xHH, \uHHHH
and \u{…} sequences back to plain text.
CSV escaping treats your text as a single field. If it contains a comma,
double quote, or line break, the field is wrapped in double quotes and any inner quotes are
doubled (" becomes "") per RFC 4180. Unescaping strips the wrapping
quotes and collapses the doubled quotes back to one.
Private by design. Your text never leaves your device. All escaping happens right here in your browser — nothing is uploaded or stored.
Frequently Asked Questions
What's the difference between escaping and unescaping? ▼
\", \n and \t. Unescaping reverses that, turning an escaped string back into plain, readable text.