About the JSON Escape / Unescape
Escape text so it can be safely placed inside a JSON string: double quotes, backslashes, newlines, tabs and other control characters are converted to their escape sequences. Unescape does the reverse, turning \n, \" and \uXXXX sequences back into plain text.
It's handy when embedding JSON in JSON, writing test fixtures or reading escaped strings from logs.
How to use it
- Choose Escape or Unescape.
- Paste your text.
- Copy the result.
Features
- Spec-compliant escaping
- Unicode escape decoding
- Accepts strings with or without surrounding quotes
Frequently asked questions
Which characters must be escaped in JSON?
Double quote, backslash and control characters U+0000 to U+001F. Forward slash and non-ASCII characters may be escaped but don't have to be.
Is my data uploaded anywhere?
No. All processing happens in JavaScript inside your browser tab. Your input is never sent to a server, logged or stored, so it is safe to use with internal or sensitive data.