JSON Key Sorter
Sort object keys alphabetically at every depth, with an option to preserve array order.
Sort JSON keys
Sorted: —
How to use the JSON Key Sorter
- Paste the JSON document whose keys need sorting.
- Choose the indentation and whether arrays keep their order.
- Press Sort keys, then copy the rebuilt document.
Features
- Alphabetical sorting at every depth
- Array order preserved by default
- Two space, four space or minified output
- Key and object counts reported
Advertisement
Frequently Asked Questions
Common questions about the free online json key sorter.
Paste the document and press Sort keys. Every object is rebuilt in alphabetical order while
values stay attached to their keys.
Yes. Sorting is applied recursively, so objects inside objects and inside arrays are all
rebuilt in alphabetical order.
When ticked, array items keep their original positions, which matters for lists where order
carries meaning.
Array items are then sorted by their serialised text, which is handy when you want a fully
deterministic document.
Yes. Choose the minified indentation option to remove all whitespace, or pick two or four
spaces for readable output.
Sorted keys make diffs stable, output reproducible and payloads easier to scan when they are
compared across systems.
No. The document is parsed and rebuilt locally in your browser, so nothing you paste is
transmitted anywhere.
No. Only the order of object keys changes, and values keep their exact types, numbers and
text.
Yes. The sorter is completely free, unlimited and needs no account or sign-up.
Last updated: October 10, 2026