How to use JSON Sort Keys

  1. Paste your JSON in the input area.
  2. Click Convert to sort object keys alphabetically at all nesting levels.
  3. Copy or download the sorted JSON.

Example

Input

{"b":1,"a":{"d":4,"c":3}}

Output

{
  "a": {
    "c": 3,
    "d": 4
  },
  "b": 1
}

Frequently asked questions

Why sort JSON keys?
Sorted keys make diffs cleaner, configs easier to scan, and help enforce consistent formatting in version control.
Does key sorting change the data?
No. It only reorders keys; values and structure stay the same.