JSON Key Sorter
Recursively sort JSON object keys alphabetically. Optional reverse order, case-insensitive. Free, runs 100% in your browser.
Reference
How does the JSON key sorter work?
This tool parses your JSON, walks every object recursively, and rebuilds each one with its keys sorted using Array.prototype.sort(). Arrays preserve their order — only object keys are sorted. The case-insensitive option uses locale-aware comparison so apple and Banana sort naturally instead of having uppercase come first.
Common uses
- Diff stability — sort keys to make JSON diffs predictable across services.
- API response normalization — compare responses without false positives from key order.
- Config files — alphabetize package.json, tsconfig.json, and other config files.
- Code review — make schema or settings changes easier to spot.
Privacy
All processing runs 100% in your browser. No data is sent to any server.