JSON Stringify and Unescape
Convert JSON to an escaped one-line string for your code, or turn an escaped string back into readable JSON. More data tools
Escape and unescape JSON strings
Choose JSON to escaped string to get a single quoted string you can paste into JavaScript, Java, Python or a config value. Choose Escaped string to JSON to reverse it, for example when a log or an API returns JSON inside a string with \" everywhere.
You can pick double, single or backtick quotes, and the escaping follows the quote you choose.
Features
- Live: the result updates while you type.
- Clear errors: the line, the reason and, where possible, a one-click fix.
- Open and drop files, copy or download the result, and share your input as a link.
- Send to another tool: pass the result straight to a related tool.
- Private: Everything runs in your browser. Your data is not uploaded to any server.
Related data tools
- JSON Validator: Paste JSON to check it. If something is wrong you see the line, the reason and a one-click fix. Nothing is uploaded.
- JSON Minifier: Paste JSON and get the smallest valid version. You see how many bytes you saved.
- Sort JSON Keys: Put every object key in order, at all levels. Great before comparing or committing JSON.
- JSON Tree Viewer: See JSON as a tree you can expand, search and copy paths from.
- JSON Compare: Paste two JSON documents and see exactly what was added, removed or changed.
- JSON Path Evaluator: Type a JSONPath and see what it matches in your JSON, live.
- All DataMint tools
Frequently asked questions
What is a stringified JSON?
It is JSON text inside a string, with quotes and backslashes escaped so it can be stored or sent as plain text.
Why do I see \" in my JSON?
The JSON was stringified once. Use the Escaped string to JSON direction to read it.
Is my data private?
Everything runs in your browser. Your data is not uploaded to any server. You can even use the tool offline once the page has loaded.