Encode & Decode · Runs in your browser
JSON Stringify
Convert a JSON document into a single quoted string — ready to embed in another JSON value, a test fixture, an environment variable or source code.
JSON
Drop a file to load it
String
How to use it
- Paste valid JSON.
- Keep “Minify first” on for a compact one-line string.
- Copy the quoted, escaped string.
What it does
The output is the JSON text itself encoded as a JSON string — what JSON.stringify(JSON.stringify(value)) produces in JavaScript.
Going back
Use JSON Unescape to turn the string back into the original document.
Exact numbers
Numbers are written exactly as in your input, so long IDs aren’t rounded on the way.
More encode & decode tools
All free, all private, all running locally in your browser.