Sort JSON Keys
Reorder every object key alphabetically, at every level of nesting.
Runs entirely in your browser.
Sort JSON Object Keys Alphabetically
About Sort JSON Keys
This sorts the keys of every object, recursively, and leaves array order alone - arrays are ordered by definition, so reordering them would change the data. Object key order carries no meaning in JSON, so sorting is always safe.
The reason to do it is diffing. Two exports of the same data with keys in different orders produce a huge meaningless diff; sort both first and only the real differences remain. It also makes config files easier to scan.
Other JSON Tools
- JSON Formatter — beautify, minify and validate on one page
- JSON Minifier — strip whitespace to the smallest form
- JSON Validator — find the line and column of the first error
- JSON Stringify — escape JSON into a string literal, or back
- JSON Compare — diff two JSON documents
- JSON Tree Viewer — browse a document as a tree