Minify JSON Without Breaking Unicode
To minify JSON without turning non-ASCII letters into \uXXXX escapes, parse with JSON.parse and serialize with JSON.stringify (no space argument). ECMA-262 QuoteJSONString keeps code points above U+001F as characters, except " and \. That is not Python ensure_ascii=True. Minify does not call String.prototype.normalize. JSON output of NFC é stays é. JSON output of NFD e + U+0301 stays e + U+0301. They are not the same JSON string. Compose e + U+0301 to é (U+00E9) on /unicode-normalize/. Try it with the ASCII John Doe object. Nothing is uploaded.
The live JSON formatter uses the browser's built-in serializer. Unlike ASCII-only encoders that rewrite café as caf\u00e9, the Minify button keeps non-ASCII characters intact. RFC 8259 allows both spellings — the browser just picks the more readable one.
What Minify produces
The JSON below can be pasted into the formatter. Clicking Minify removes whitespace and returns the same compact line. Numbers like age are preserved as JavaScript Number values.
What JSON.stringify actually writes
Non-ASCII stays a character
Docify minifies with JSON.parse then JSON.stringify(value). QuoteJSONString (ECMA-262) escapes only quote, backslash, and U+0000–U+001F (with the usual \b / \t / \n / \f / \r shortcuts). Letters, CJK, and emoji are written as those characters, not as ASCII \u sequences. This café pair is a separate paste — not the Example output.
Input escapes are decoded
If the pasted text already uses \u00e9, the parser turns that escape into é. The compact output then contains the character. Both forms are valid JSON strings (RFC 8259 §7). The tool does not preserve the original escape spelling. The example has no \u00e9 escape.
Python’s default is the other spelling
CPython json.dumps defaults to ensure_ascii=True, so the same object prints caf\u00e9. Pass ensure_ascii=False to match the browser. Docify never runs that library; this page only names the default so the two outputs are not mistaken for a parse error. Example: Minify returns the compact John Doe line either way, because that output is ASCII.
What minify still changes
- Whitespace outside strings is dropped. That is the compact line:
JSON.stringifywith no indent. Try it with already compact, so Minify writes that same line. - Numbers follow IEEE-754. Values that do not fit a JavaScript Number may round. That is not a Unicode rewrite. The sample
ageis the number 30. - Comments, trailing commas, and JSON5 are rejected by
JSON.parse. Standard JSON only (ECMA-404 / RFC 8259).
Minify JSON in the browser
Example: Minify returns the compact John Doe line. Non-ASCII stays characters. Nothing is uploaded.
Open JSON Formatter →FAQ
- Does minifying break Unicode characters?
- No. JSON.stringify preserves Unicode characters. They are not converted to escape sequences.
- What does minifying remove?
- Minifying removes whitespace between tokens. Keys, values, and Unicode content are preserved.
- Does it change numbers or strings?
- No. The semantic content is preserved. Only formatting whitespace is removed.
- Does this tool upload my JSON?
- No. All processing runs in your browser using JSON.parse and JSON.stringify.