JSON to String & String to JSON
Paste an escaped blob and get readable JSON back — including JSON that has been escaped more than once. Or go the other way and get a one-line string literal ready to paste into Java, Python, JavaScript or a shell command.
Result will appear here
JSON that has been escaped more than once
A document stored in a string field, then that record stored in another string field, comes out looking like this:
"\"{\\\"user\\\":\\\"Ada\\\"}\""
One pass of unescaping leaves you with something that still looks escaped, which is where most tools stop and most people get stuck. This one keeps unwrapping until the result parses, then tells you how many layers it removed — so you know whether the producer is double-encoding, which is usually the real bug.
String literals that actually paste
JSON, JavaScript, Java, C#, Kotlin
Double-quoted with the escapes RFC 8259 §7 requires. The same literal works in all of them, because they share the escape set.
Python
Single-quoted, so the inner double quotes need no escaping at all — which is what you would write by hand. Verified by evaluating the output and parsing the result.
Shell
Single-quoted, which protects everything from the shell. A literal apostrophe is closed, escaped
and reopened — the only way to include one. Verified by round-tripping it through sh.
Where to go next
- Escape / Unescape — the same engine with per-runtime presets, if you need output that matches Go, Python or .NET byte for byte
- Formatter — once it is readable JSON
- Minifier — for a one-line document without the quoting
- Error registry — if what comes out still will not parse