Recursively sort the keys of a JSON object alphabetically (ascending or descending) with configurable indentation. JSON Key Sorter is a free online tool from the ToolsRift JavaScript Tools collection. It runs entirely in your browser — nothing to install, no signup, and your data never leaves your device.
Paste valid JSON, choose sort direction and indentation, then click Sort Keys. Nested objects and objects inside arrays are sorted too.
Yes. Sorting is recursive, so objects nested inside other objects or inside arrays all have their keys ordered consistently.
Yes. Only object keys are reordered. The order of array elements is never changed, keeping the data semantically identical.
It expects strict JSON with double-quoted keys. Invalid JSON produces a clear error message so you can fix it before sorting.