JSON Key Sorter
Sort JSON object keys alphabetically or in reverse order. Recursively processes nested objects so every level is consistently ordered ā great for diffs, readability, and canonical serialization.
Features
š¤ Alphabetical Sorting
- Ascending (AāZ) or descending (ZāA)
- Case-sensitive locale comparison
- Works on any valid JSON object
- Preserves all values unchanged
š² Recursive Processing
- Sorts keys at every nesting level
- Objects inside arrays are sorted too
- Optional ā disable for top-level only
- Handles deeply nested structures
āļø Flexible Options
- Sort primitive arrays optionally
- 2-space indented output
- Copy or download result instantly
- Zero-dependency, runs in browser
JSON Key Sorting Guide
How to Sort JSON Keys
Paste your JSON into the input panel, choose your sort order and options, then click Sort JSON. The sorted output appears on the right ready to copy or download.
// Input
{"zebra": 1, "apple": 2, "mango": 3}
// Output (ascending)
{"apple": 2, "mango": 3, "zebra": 1}