Free · Private · In-Browser

JSON Sorter

Sort JSON object keys recursively for cleaner diffs and reviews.

Output
 

Sort JSON keys for clean diffs

When two JSON objects have the same data in a different key order, diffs light up with false changes and reviews get noisy. This sorter recursively orders object keys alphabetically, so equivalent objects look equivalent and real changes stand out.

Consistent key order also makes JSON easier to scan and compare by eye. Paste your JSON, get a version with sorted keys at every level, and copy it — a small step that makes version control and code review noticeably cleaner.

Stable key order

Recursively sorting keys makes two objects with the same data diff cleanly instead of lighting up with false changes. Sorting runs in your browser, nothing uploaded.

Frequently asked questions

Does it sort nested objects?

Yes. Keys are sorted alphabetically at every level of nesting.

Does it change the order of arrays?

No. Array items keep their order, because order in an array usually has meaning. Objects inside arrays still get their keys sorted.

Why sort JSON keys?

Consistent key order makes diffs and code reviews cleaner, since only real changes show up.

Take it further
Developer Tools

Practical utilities for everyday web development work.

Learn more