PB
Available
code
lock Free · Private · In-Browser

Sort JSON Keys

Alphabetically sort every object key in a JSON document.

Consistent, sorted JSON

Two JSON files can hold identical data yet diff messily because their keys are in different orders. Sorting keys alphabetically at every level gives a stable, canonical form.

The tool walks the whole document, ordering each object’s keys while leaving array sequences and all values untouched. The result is clean to diff and easy to compare.

Stable and private

Sorting happens in your browser, so your JSON is never uploaded.

Frequently Asked Questions

What does it sort?

Every object’s keys, recursively, into alphabetical order. Array order is preserved, since arrays are sequences, not key sets.

Why sort keys?

Consistent key order makes JSON diffs clean and stable, and helps deduplicate configs that differ only in ordering.

Does it change values?

No. Only the order of keys changes; every value stays exactly as it was.

Take it further
All Free Tools

Browse the full set of free, private, in-browser tools.

Learn More arrow_forward