JSON Key Sorter
Sort JSON object keys recursively in ascending or descending order, optionally sort arrays, and preserve your formatting indent.
About This Tool
Recursively sorts every object in a JSON document so diffs between API payloads, locale files, and configuration manifests stay clean and deterministic.
In addition to object keys, you can optionally sort arrays of primitives (numbers, strings, booleans) or sort arrays of objects by a chosen property key while preserving your original indentation.
Key Features
- Recursive key sorting: Sorts keys at every nesting depth in ascending (A to Z) or descending (Z to A) order.
- Case sensitivity toggle: Sort using strict ASCII/Unicode code points or fold uppercase and lowercase letters together.
- Primitive & object array sorting: Keep array order untouched by default, or sort primitive arrays and object arrays by a target key.
- Indentation preservation: Automatically detects 2-space, 4-space, or tab indentation from your input, or formats to a fixed indent.