JSON Escape / Unescape
About JSON Escape / Unescape
The JSON escape and unescape tool converts JSON into a string literal you can safely embed inside source code, and reverses that process to recover the original JSON. It handles the quoting and backslash escaping that trips people up when a JSON blob has to live inside another string.
It works completely in your browser — no upload, no server round trip — so escaping a config, a token payload or a fixture is private by default. It is free with no account and no limits.
Reach for it when you need to paste JSON into a Java, Go, C# or SQL string, drop a fixture into a test file, or store JSON inside another JSON field. Then use unescape mode to turn a stringified, backslash-heavy blob back into clean, readable JSON.
How it works
Escape mode
Escape mode wraps your JSON so it becomes a valid string literal: double quotes become \", backslashes are doubled, and control characters like newlines and tabs turn into \n and \t. The result can be pasted directly between quotes in most programming languages.
Unescape mode
Unescape mode does the reverse. Paste a string that contains escaped JSON — the kind you copied out of a log line or a stringified field — and it resolves the escape sequences back into the real characters, giving you JSON you can read and format.
Control and Unicode characters
Newlines, tabs, carriage returns and other control characters are represented with their standard short escapes where one exists, and as \uXXXX otherwise. Unescaping restores them exactly, so the round trip does not lose or corrupt data.
Switching direction
The Mode control flips between escape and unescape without clearing your input, so you can quickly check that a value round-trips or reverse an operation you just ran.
Frequently asked questions
What is the difference between escaping and stringifying JSON?
They are the same idea: escaping turns a JSON document into a single string value by quoting it and adding backslashes, so it can sit inside another string. Unescaping reverses it.
Why do I need to escape JSON at all?
When JSON has to live inside another string — a code literal, a SQL statement, or a JSON field that itself holds JSON — its quotes and backslashes would otherwise break the outer syntax. Escaping makes it safe to embed.
Does escaping change the data inside my JSON?
No. The underlying values are identical; only the representation changes. Unescaping the output returns byte-for-byte the JSON you started with.
Is my input sent to a server?
No. Escaping and unescaping happen locally in your browser, so it is safe to use with sensitive payloads.
It says my escaped input can't be unescaped — why?
Unescape mode expects a valid string literal. If the backslash sequences are malformed or the quotes are unbalanced, it reports the problem so you can correct the input.