JSON key sorter
Processed in your browser · nothing is uploaded
Sorts object keys alphabetically at every level of nesting. Values, and the order of arrays, are untouched.
How to use the json key sorter
The reason to do this is diffing. Key order carries no meaning in JSON, but it means everything to a text diff — two objects with identical data serialised by different languages produce a diff that appears to change every line. Sorting both first reduces that to the differences that are real. It is also the cheap way to make a config file reviewable in a pull request. One thing deliberately not done: array order is significant in JSON, so sorting an array would change the data rather than its presentation.
Questions
Not to the standard or to any parser. It matters a great deal to a text diff, which is why sorting helps.