JSON string escape and unescape
Raw Unicode text ↔ one JSON string literal. Escape optionally emits ASCII UTF-16 escape pairs.
- Runs in your browser
- No upload
- Check before download
Inputs stay in this tab and are not uploaded or saved automatically. Optional aggregate usage counts and coarse processing diagnostics are sent only after consent, without input content or filenames. Clearing or closing loses inputs; save needed outputs first.
Formats and limits
Raw Unicode text ↔ one JSON string literal. Escape optionally emits ASCII UTF-16 escape pairs. Unescape requires a string, validates JSON escapes and rejects lone surrogate code units; no number/object coercion. Text downloads are UTF-8 and preserve controls and supplementary characters.
UTF-8 only. Input up to 1 MiB; XML up to 100,000 UTF-16 units and depth 64; JSON up to 20,000 nodes. JSON Lines up to 16 MiB, 100,000 records and 1 MiB per value. Output up to 32 MiB. Queries run for up to 3 seconds and other jobs for up to 10 seconds in a worker you can cancel. XSD native memory is limited to 64 MiB; this is not the whole worker or DOM heap.
How to use it
- Choose the source and mode
Choose escape for raw text, or unescape for one quoted JSON string literal. ASCII output is optional; it changes how characters are escaped, not the decoded Unicode content.
- Configure the domain parameters
In the loaded example, the quotes around the text get a backslash and the newline becomes backslash-n. ASCII mode encodes 👋 as two UTF-16 escape sequences, and unescape restores the original quotes, newline and emoji.
- Inspect diagnostics and download
Download string.json for the literal or string.txt for the decoded UTF-8 text. A visible backslash-n in JSON becomes a real newline after unescape, so copying the JSON literal is different from copying the decoded text.
Formats and limits
Why is this input rejected or empty?
Unescape needs a JSON string, not an object, a number or unquoted text. Malformed escapes and isolated UTF-16 surrogates are rejected. Don't add a second layer of quotes unless you want to encode the literal itself.
Which parser profile and limits apply?
One string at a time, with input limited to 1 MiB. This is JSON escaping, not HTML sanitizing, URL encoding or validation of executable code. Control characters remain part of the decoded text.
Are inputs or referenced files sent to a server?
Parsing runs locally in a browser worker. URLs inside the input are not used to fetch remote documents. Supply any schema dependencies the tool supports as local files, keep your source file separately, and download the results before you close the page.