JSON Tools
JSON Escape / Unescape
Escape or unescape JSON strings.
Loading tool…
What is Escape?
The JSON Escape/Unescape tool converts a raw string into its JSON-escaped form (where special characters like quotes and newlines are escaped), or reverses the process to recover the original plain text.
How it works
For escaping, we use JSON.stringify to produce a properly escaped version wrapped in quotes. For unescaping, we JSON.parse the input and extract the string value.
- Choose mode. Escape: raw string → escaped. Unescape: escaped → raw string.
- Paste text. Paste a raw string to escape, or an escaped string to unescape.
- Copy result. Copy the escaped/unescaped result.
Examples
Escape
hello "world" becomes "hello \"world\"".
Unescape
"hello\nworld" becomes hello (newline) world.
Common mistakes
Double escaping
If you escape an already-escaped string, you'll double the backslashes. Start from raw text.
Alternatives
JSON Formatter
For formatting entire JSON documents, not just escaping strings.
Frequently asked questions
What characters get escaped?
Double quotes, backslashes, newlines, tabs, and other control characters.