The JSON sorter reorders every object's keys alphabetically, recursively through the whole document, and pretty-prints the result. Two documents with the same data but different key order become byte-identical after sorting, which is exactly what you want before diffing, committing or deduplicating JSON.
Sorting runs entirely in your browser — nothing you paste is uploaded or logged — so it is safe for production payloads, configs with secrets and customer records. It is free, instant and needs no account.
Reach for it when a config file has grown messy from hand edits, when two API responses won't diff cleanly because the keys moved, or when you want stable, canonical JSON that produces minimal version-control noise.
Every object in the document — top-level and nested at any depth — gets its keys re-emitted in alphabetical order. Values are untouched: numbers, strings, booleans and null come out exactly as they went in, only the key order changes.
Ascending alphabetical order is the default and the conventional canonical form. Flip the order control to Z→A when you want reverse order, for example to surface a particular group of keys at the top.
Arrays are left in their original order by default, because array position is often meaningful data. Turn on Sort arrays to also sort arrays of plain values (strings, numbers, booleans). Arrays that contain objects always keep their order — there is no single sensible way to rank objects, and silently choosing one would corrupt list semantics.
Text diff tools compare line by line, so the same data with reordered keys shows up as a wall of changes. Sorting both sides first makes key order irrelevant, leaving the diff to show only real value changes — smaller pull requests and faster reviews.
No. The JSON specification says object key order carries no meaning, and every value is preserved exactly. Only the order in which keys are written changes — any standard parser reads the sorted document as identical data.
Yes. The sort is recursive, so objects inside arrays and objects nested many levels deep all get alphabetically ordered keys.
Array order is often meaningful — steps, rankings, coordinates — so arrays are preserved by default. Enable the Sort arrays toggle to sort arrays of plain scalar values; arrays of objects always keep their order.
No. Sorting runs entirely in your browser with JavaScript, so production payloads and configs with secrets never leave your machine.
Before diffing two documents, before committing config files to version control, or when generating canonical output for hashing and caching. Consistent key order eliminates noise so only real changes stand out.