JSON Stringify & Escape
Turn JSON into an escaped string you can embed anywhere.
Opens the editor with the input on the left and its stringified form on the right. Everything runs locally.
Stringifying wraps a value in quotes and escapes every special character inside it, turning JSON into a single JSON string. That is exactly what you need when a document has to live inside another one — a JSON payload embedded in a JSON field, a snippet pasted into source code, or a value stored in a log line or database column.
Stringify vs. escape vs. format
- Stringify converts a value into a quoted, escaped string:
{"a":1}becomes"{\"a\":1}". - Escape adds backslashes to quotes and backslashes without adding the outer quotes — handy when you are pasting into an existing string literal.
- Format only changes indentation; it does not escape anything.
Reversible round trips
Every operation here has an inverse. Unstringify unwraps a quoted string back into the raw value; unescape removes the backslashes. So you can take an escaped blob out of a log, unstringify it, read it as a tree, edit it, and stringify it again — without hand-counting backslashes.
Why do it with a real serializer
Escaping by hand is where bugs live: one missed quote or backslash and the whole string breaks. This tool uses the JavaScript engine's own JSON.stringify(), so the escaping is always correct — the same result your code would produce.
Nothing is uploaded
The conversion runs in your browser. Escaped tokens and secrets never leave your device.
Frequently asked questions
What does it mean to stringify JSON?
It converts a JSON value into a single escaped string — every inner quote becomes \\" — so the whole document can be safely embedded inside another string or JSON field.
How do I reverse it?
Use Unstringify to unwrap the quoted string back into the original value, or Unescape to remove the backslashes. Both are available in the editor.
Why not just add the quotes myself?
Manual escaping is error-prone — one missed backslash breaks the string. Using a real serializer guarantees the escaping matches exactly what your code will parse.
Related tools
Prefer to start from scratch? Open the JSON editor and paste your own data — everything runs locally in your browser.