Skip to content
Convertto

JSON Key Sorter

Sort object keys and arrays in a JSON document to make two versions comparable.

Sorting JSON keys puts a document into a canonical order so two versions can be compared meaningfully. Object key order is not significant in JSON, so a diff between differently-ordered documents is noise — sorting both first removes it.

Runs in your browser
Privacy
Runs entirely in your browser — nothing is uploaded
Cost
Free, unlimited, no sign-up

Frequently asked questions

Is it safe to sort arrays?

Only when the order carries no meaning. In a list of tags it is fine; in a list of steps, a sequence of events, or anything positional, sorting destroys information. That is why it is off by default.

How to use the json key sorter

  1. 1Enter or paste your json.
  2. 2Choose the sort object keys.
  3. 3Turn "Sort array values too" on or off as needed.
  4. 4Enter or paste your sort arrays of objects by.
  5. 5Turn "Pretty-print" on or off as needed.
  6. 6The result appears immediately — copy or download it.

Embed this tool

Put the working json key sorter on your own site. It runs in your visitors' browsers exactly as it does here — free, no account, nothing uploaded.

Share this tool

Last updated

More data & format tools