Skip to content
QKQuickKit日本語
Data FormatsLOCALRuns in your browser

JSON Formatter / Minifier

Pretty-print or minify JSON in the browser, with optional recursive key sorting.

This tool handles input and primary processing in your browser and is designed not to send the input to QuickKit’s server.

Result

How it works

Parses strict JSON and re-serializes it. Minify removes all insignificant whitespace. Without key sorting, object members keep their input order, including names that look like numbers such as "10" and "2". Key sorting orders object members by Unicode code point at every level, whatever the browser's language: uppercase letters come before lowercase ones, so "B" sorts before "a". Array order is never changed. If an object repeats a member name (compared after decoding escapes, so "a" and "\u0061" are the same name), every one of those members stays in the output, in input order even when sorting, and a warning lists their JSON Pointer locations; RFC 8259 says names SHOULD be unique, and other software may keep only one of them. Strings are re-escaped the way JSON.stringify writes them. Numbers are written as their original JSON text and never rounded through a JavaScript Number, so 9007199254740993, 1e400, -0 and 1.10 stay unchanged. JSON nesting is limited to 1,000 levels.