JSON Sorter

Sort JSON keys A to Z at every level so files are easier to read and compare.

Add JSON and click Sort to see the result here.

How JSON Sorter works

Sorts the keys of every JSON object in A to Z or Z to A order. It sorts at every level, including objects inside arrays. Sorted JSON is easier to read and easier to compare.

The sort ignores case and reads numbers in keys as numbers, so item2 comes before item10. The order of array items does not change, unless you turn on Sort lists of values too.

Input to JSON Sorter

  • Paste or type JSON into the input box, or upload a .json or .txt file.
  • Input must be valid JSON. If it is not, you see the line and column of the first error.

Output from JSON Sorter

  • JSON with sorted keys, indented with 2 spaces, 4 spaces or a tab.
  • Sort lists of values too sorts arrays that hold only plain values, like numbers or strings. Arrays of objects keep their order.
  • Change any option after sorting and the output updates right away. Copy it, download it as sorted.json or open it in full screen.