What this tool does
Every object’s keys, at every depth, in alphabetical order:
{ "server": { "port": 8080, "host": "localhost" }, "debug": true }
{
"debug": true,
"server": {
"host": "localhost",
"port": 8080
}
}
Arrays keep their order
An object in JSON is an unordered set of name/value pairs — the specification says so, and no parser promises to preserve the order you wrote. An array is a sequence, and its order is a value.
["migrate", "seed", "start"]
Sorting that would turn a runbook into a wordlist. So arrays are left exactly as they are, at every level.
The order is by code point
Z comes before a, and a before é. That is Unicode code point order, not the alphabetical order of any particular language.
It is the only choice that gives the same output on every machine. A locale-aware sort puts ä next to a in German and after z in Swedish, so the same file would come back differently depending on who ran the tool — which defeats the main use of sorting, namely comparing two files that drifted apart.
Sorting is not canonicalising
A sorted document is easier to diff. It is not a canonical form you can hash and compare.
RFC 8785, the JSON Canonicalization Scheme, also pins down how numbers are written and how strings are escaped. This tool deliberately touches neither: 1.0 stays 1.0, and \u00e9 stays \u00e9. Two documents meaning exactly the same thing can therefore still sort to two different texts.
If you need a stable fingerprint of a JSON value, use a JCS implementation. If you need to see what changed between two configuration files, sort them both and diff.
Private by design
Everything runs locally in your browser with JavaScript. Your data is never uploaded, which makes the tool safe for sensitive content, and it keeps working offline.