Sort JSON Keys

Recursively sort all object key names in alphabetical order

How to use

  1. Paste the object or array to sort into "JSON input".
  2. Choose ascending (A→Z) or descending (Z→A) in "Direction".
  3. Click "Sort"; keys are recursively ordered alphabetically on the right.
  4. Tip: array order is kept; only object keys are sorted, handy for version-control diffs.

FAQ

Does sorting change the meaning of the data?

No. Key order in a JSON object is semantically meaningless. Sorting only makes the output more readable and easier to diff in version control.

Will arrays be sorted?

No. Array element order is meaningful; this tool only sorts object keys and leaves arrays untouched.