Sort the keys of every object in a JSON document alphabetically, at every level of nesting. Arrays keep their order, values stay exactly as written, and it all happens in your browser.
Add to Chrome Free: formats JSON pages right in the tab.
.json file onto
it, or load it from a URL.
Sorted keys line up two versions of a config or API response, so text diffs and code reviews show only real changes.
Generated JSON with keys in random order becomes deterministic, which keeps version control history quiet.
Large objects are easier to scan when you know where a key will be.
Array items keep their order because it carries meaning, and numbers keep their exact digits.
No. Keys are compared without regard to case, so apple,
Banana and cherry come out in that order.
No. The order of array items is part of the data, so only object keys are sorted, inside arrays as well as at the top level.
Yes. Undo steps back to the version before sorting, and History lets you jump to any of the last 30 versions.