JSON Escape / Unescape
Convert text to/from JSON string escape sequences. Runs in your browser.
In Escape mode, the tool runs JSON.stringify(input) and strips the outer quotes — giving you the inner escape sequences that would appear inside a JSON string. In Unescape mode, it wraps your input in quotes and runs JSON.parse() — converting \n to actual newlines, \" to literal quotes, etc.
When do I need to escape JSON?
When you're embedding a string inside another JSON document, or building JSON by hand and need to include special characters like quotes, backslashes, or newlines.
Why does my output have backslashes?
That's the escape sequence. \n means newline, \" means a literal quote inside a string, and \\ means a literal backslash.
Does this handle Unicode?
Yes. Characters outside the basic ASCII range can be represented as \uXXXX escape sequences. The unescape direction converts them back.