About this tool
JSON Key Sorter is a free, in-browser tool that walks a JSON document and sorts every object's keys into a predictable order. Paste your JSON, click Format, and it parses the text with the browser's own JSON engine, recursively sorts each nested object's keys, and prints the reordered result. Arrays keep their original order; only the keys inside objects move.
Keys are ordered lexicographically by character code, so uppercase letters sort before lowercase and numeric-looking keys sort as text; tick Descending to reverse it. Output can use 2- or 4-space indent, a tab, or a minified single line, with a Copy button for the result.
Everything runs client-side, so nothing is uploaded and it works offline — no accounts, no tracking. Sorting keys the same way every time keeps diffs stable and config files easier to scan.