JSON Escape / Unescape Online
Escape or unescape JSON strings instantly in your browser.
What Is JSON Escape / Unescape?
JSON Escape converts plain text into a valid JSON string by replacing characters that would break JSON syntax — double quotes become \", backslashes become \\, newlines become \n, and control characters become \uXXXX sequences. JSON Unescape does the reverse, converting those escape sequences back to their original characters. This tool is useful when building JSON payloads manually, debugging API responses, or embedding multiline text in JSON config files.
How to Use JSON Escape / Unescape
- Select Escape to encode text for use in a JSON string, or Unescape to decode a JSON-escaped string back to plain text.
- Paste your text into the input panel, or click Load Sample to try an example.
- The converted output appears instantly in the right panel.
- Click Copy to copy the result to clipboard.
Features
- Escape mode: encodes ", \, \n, \r, \t, and control characters
- Unescape mode: decodes all standard JSON escape sequences including \uXXXX
- Handles quoted JSON strings — strips outer quotes automatically when unescaping
- Instant real-time conversion as you type
- Copy result to clipboard in one click
- Runs entirely in your browser — zero data uploaded
FAQ
What is JSON string escaping?
JSON string escaping converts characters that are not allowed inside a JSON string — such as double quotes, backslashes, and newlines — into their escape sequences (\", \\, \n) so the string is valid JSON.
When do I need to escape a string for JSON?
You need to escape a string when embedding arbitrary text as a JSON value — for example, when building a JSON payload manually, storing multiline text in a JSON config file, or passing a string containing quotes through an API.
What characters are escaped in JSON?
JSON requires escaping: double quote ("), backslash (\), and control characters including newline (\n), carriage return (\r), tab (\t), and other characters in the range U+0000–U+001F.
Is my data sent to a server?
No. All processing happens entirely in your browser. Your text never leaves your device.