Search for a tool or command
Recursively sort object keys alphabetically for stable, diffable JSON.
The JSON Sort Keys tool reorders the keys of every object in your document alphabetically, all the way down through nested structures. Consistent key order makes two JSON files diff cleanly, snapshots stay stable, and version control noise disappears. Array element order is left untouched because arrays are ordered by design.
Add the object or array whose keys you want to normalize.
Choose ascending or descending, and case-sensitive or case-insensitive ordering.
Keys are reordered recursively while values and array order stay the same.
Use the sorted JSON for stable diffs, commits, or golden-file tests.
Input
{
"name": "Alan",
"age": 41,
"address": { "zip": "94016", "city": "SF" }
}Output
{
"address": {
"city": "SF",
"zip": "94016"
},
"age": 41,
"name": "Alan"
}Pretty-print JSON with configurable indentation and instant validation.
Compare two JSON documents and see a precise structural diff.
Strip whitespace to shrink JSON to the smallest valid payload.
Analyze JSON size, depth, key counts, and type distribution.