Sort JSON Keys

Put every object key in order, at all levels. Great before comparing or committing JSON. More data tools

Sort JSON keys alphabetically

Sorted keys make two JSON files easy to compare and keep version-control diffs small. Choose A to Z or Z to A, sort nested objects or only the top level, and ignore case if you want apple and Banana in natural order.

Array order is never changed, because the order of items in an array carries meaning.

Features

  • Live: the result updates while you type.
  • Clear errors: the line, the reason and, where possible, a one-click fix.
  • Open and drop files, copy or download the result, and share your input as a link.
  • Send to another tool: pass the result straight to a related tool.
  • Private: Everything runs in your browser. Your data is not uploaded to any server.

Related data tools

  • JSON Validator: Paste JSON to check it. If something is wrong you see the line, the reason and a one-click fix. Nothing is uploaded.
  • JSON Minifier: Paste JSON and get the smallest valid version. You see how many bytes you saved.
  • JSON Stringify: Convert JSON to an escaped one-line string for your code, or turn an escaped string back into readable JSON.
  • JSON Tree Viewer: See JSON as a tree you can expand, search and copy paths from.
  • JSON Compare: Paste two JSON documents and see exactly what was added, removed or changed.
  • JSON Path Evaluator: Type a JSONPath and see what it matches in your JSON, live.
  • All DataMint tools

Frequently asked questions

Does it sort arrays?

No. Array items keep their order. Only object keys are sorted.

Is the sort case sensitive?

By default capital letters come first. Tick Ignore case for a natural order.

Is my data private?

Everything runs in your browser. Your data is not uploaded to any server. You can even use the tool offline once the page has loaded.