Web Tools
JSON Key Sorter
Sort JSON object keys alphabetically (A-Z or Z-A) or by value type. Supports deep sorting of nested objects and arrays. Shows key count, nesting depth, and structure statistics. Runs entirely in your browser — your data never leaves your machine.
json sort keys order organize alphabetical format
Published May 29, 2026
All interactive tools run entirely in your browser. Your data never leaves your device.
How It Works
Paste JSON and sort all object keys in ascending (A-Z), descending (Z-A), or by-value-type order. Deep sorting recursively processes nested objects and arrays. Useful for normalizing JSON for consistent diffs and comparisons.
Features
- Three sort orders: ascending (A-Z), descending (Z-A), by value type
- By-type sorting: groups null, boolean, number, string, array, object — then alphabetical within each type
- Deep/shallow: toggle recursive sorting of nested objects
- Configurable indent: 2 or 4 spaces
- Statistics: total keys, nesting depth, object/array counts
- Copy to clipboard: one-click copy of sorted JSON
- 5 examples: package.json, nested config, API response, TSConfig, mixed types
- Private: runs entirely in the browser — no data transmitted
Use Cases
- Normalizing JSON for consistent git diffs
- Sorting package.json fields by convention
- Comparing JSON objects after key reordering
- Cleaning up API responses for documentation
- Organizing configuration files for readability