๐ Runs in your browser โ nothing is uploadedโ Free, no signup
JSON Escape & Unescape
Escape any text โ including JSON itself โ into a valid JSON string, or turn an escaped JSON string back into readable text.
0 characters
JSON string
When should you use the JSON Escape / Unescape?
- Putting a JSON document inside another JSON field as a string
- Reading an escaped JSON string from a log or API response
- Escaping multi-line text, quotes or Windows paths for a JSON payload
How to use the JSON Escape / Unescape
- 1
Choose a direction
Escape turns text into a JSON string. Unescape turns a JSON string back into text.
- 2
Paste your text
Paste the text or the escaped string. The result updates as you type.
- 3
Set options
Choose whether to wrap the result in quotes, and whether to escape non-ASCII characters as \uXXXX.
- 4
Copy the result
Click Copy and paste it into your code or payload.
Examples
Escaping JSON to embed it in a string
Text
{"name": "Ada", "path": "C:\temp"}Escaped
"{\"name\": \"Ada\", \"path\": \"C:\\temp\"}"Common errors and how to fix them
This is not a valid JSON string- When unescaping, every double quote inside the string must be escaped as \" and backslashes as \\. Check for a stray unescaped quote.
The output is double-escaped- The input was already escaped. Use Unescape first, or escape the original text instead.
More from JSON Tools
Free tools that run in your browser โ no signup, nothing uploaded.
JSON Auto-Fixer & Formatter
Repair, validate, and beautify broken JSON (missing quotes, trailing commas).
JSON Validator & Linter
Check JSON syntax and see the exact line and column of every error.
JSON Viewer (Tree)
Explore JSON as a collapsible tree with search and click-to-copy paths.
JSON Editor
Edit JSON with live validation, a tree view, formatting and key sorting.
JSON Beautifier
Pretty-print and indent JSON for easy reading and debugging.
JSON Compare & Diff Tool
Find the difference between two JSON objects visually and quickly.
JSON Sorter (Sort Keys)
Sort JSON object keys alphabetically, including nested objects.
JSONPath Tester
Evaluate JSONPath expressions with filters and recursive queries.
JSON Schema Generator
Generate a JSON Schema from any sample JSON document.
JSON Escape / Unescape FAQ
Double quotes become \", backslashes become \\, and control characters become sequences like \n (new line), \t (tab) and \r. Other control characters use \uXXXX.
They're the same idea: JSON.stringify() on a string produces an escaped, quoted JSON string. This tool does that without writing code.
Switch to Unescape and paste the string, with or without its surrounding quotes. Escape sequences like \n and \" are turned back into real characters.
No โ JSON supports UTF-8, so รฉ or ๐ can appear as is. Tick 'Escape non-ASCII' only if a system requires pure ASCII.
Each quote inside the inner JSON must be escaped so it doesn't end the outer string. That's expected โ unescape it to read it.
No. Escaping happens in your browser.
