JSON escape and unescape
Put any text inside a JSON value safely, or turn \"Hello\"\n back into the original text.
Private: everything happens in your browser. Nothing you type or choose is uploaded.
She said "hi" C:\Users\me
How to use it
- Choose Escape or Unescape.
- Paste your text.
- Copy the result into your JSON.
Questions and answers
Which characters are escaped?
Double quotes, backslashes and control characters such as new lines (\n), tabs (\t) and carriage returns (\r), exactly as JSON.stringify does.
Can I paste a string with its quotes?
Yes. When unescaping, surrounding double quotes are optional.
Is this the same as JavaScript string escaping?
Almost: JSON always uses double quotes and does not allow single-quote escapes.