String Escape / Unescape
Escape and unescape strings for code and JSON.
Escape a string so it's safe to paste inside JSON or JavaScript source — quotes, backslashes, tabs, and newlines — or unescape it back to plain text.
Runs entirely in your browser — nothing is uploaded.
How to use the string escape / unescape
- 1Choose Escape or Unescape.
- 2Paste your text.
- 3Copy the result.
Frequently asked questions
What gets escaped?
Double quotes, backslashes, tabs, and newlines are escaped using JSON string rules.
Is this the same as HTML escaping?
No — this is for code and JSON strings. For HTML, use the HTML entity encoder.