\\n \\\" \\\\ \\uXXXX — JSON string escaping
Escapes text for embedding inside JSON double-quoted strings: \\n, \\t, \\\", \\\\, and \\uXXXX for non-BMP characters. Produces valid JSON string content (without surrounding quotes).
Text → JSON-escaped box — the escaped string appears instantly in JSON-escaped.Use \uXXXX for all non-ASCII checkbox if you want every non-ASCII character escaped to a \uXXXX sequence.Copy result to copy the escaped string to your clipboard.JSON-escaped → Text and the plain text appears in Unescaped text.Clear any time to reset a box and start over.Quotes, backslashes, and newlines inside a value will break JSON. Escape them so your strings stay valid and parse cleanly.
When composing JSON payloads or config files by hand, escape user input so it cannot corrupt the document.
\u escapes
Turn \uXXXX, \UXXXXXXXX, and \xXX sequences back into the actual characters they represent when debugging encoded data.
Tabs, newlines, and other invisible control bytes become readable \n, \t, and \u0000 sequences you can see and diff.
Convert non-ASCII text (including emoji) into \uXXXX escapes for systems that only accept ASCII, then unescape to restore it.
Everything runs in your browser. Nothing is uploaded, logged, or sent to a server — safe for sensitive strings and keys.
The characters the JSON spec requires: a double quote becomes \", a backslash becomes \\, and the control characters become \b, \f, \n, \r, and \t. Any other control character (code point below U+0020) becomes a \uXXXX sequence. Everything else passes through unchanged unless you enable all-non-ASCII escaping.
Yes. The output is the string content only — it is not wrapped in double quotes. Paste the result between "…" in your JSON document to form a complete string literal.
By default, non-ASCII characters (such as é or emoji) are left as literal characters. Ticking the box escapes every character with a code point above U+007E as a \uXXXX sequence, producing purely ASCII output.
Yes. Paste an escaped string into JSON-escaped → Text and it decodes \uXXXX, \UXXXXXXXX, \xXX, and the standard backslash escapes back into real characters.
No. JSON does not require / to be escaped — the \/ escape is optional and only needed in a few edge cases like embedding JSON inside a <script> tag. This tool leaves / unchanged, which is still valid JSON.
No. Escaping is fully reversible and provides no security — it only makes text safe to embed in JSON. Anyone can unescape the result.
Never. All escaping and unescaping happens locally in JavaScript, and nothing is sent to, stored on, or logged by any server.