Recursive sort
Keys in nested objects are sorted by name too. Deep configs are handled in one pass—no manual layer-by-layer cleanup.
Keys are sorted lexicographically so output is stable across languages and tools.
You can also load data via #data={"name":"Ada"} or #url=... It is cleared from the address bar after it is read.
Sort object keys by field name so two exports are easier to compare. Many serializers do not guarantee key order; sorting first makes Diff much cleaner. You can also commit the sorted result to Git to reduce noisy key-order churn.
Keys in nested objects are sorted by name too. Deep configs are handled in one pass—no manual layer-by-layer cleanup.
Keys are sorted lexicographically so output is stable across languages and tools.
List order usually has meaning, so the original order is kept. Timelines, steps, and rankings are not sorted by value.
When you only want to normalize object keys and leave lists alone, this page is clearer than casually checking the option on the formatter.
Sort first, then compare, to cut noise from “only the key order changed.” Sort both sides before pasting into Diff.
The formatter also has a “Sort keys” option with a similar effect. This page focuses on that one job.
{
"z": 1,
"a": { "n": 2, "m": 1 },
"m": 3
}
{
"a": {
"m": 1,
"n": 2
},
"m": 3,
"z": 1
}
Object keys are sorted by name. String values are not sorted.
The same input should produce the same key order every time, which is Git-friendly.
Array items are not reordered. Only object keys are sorted.
JavaScript’s default string comparison is used. Mixed scripts may not match a phonetic sort, so agree on a convention in the team.
Sorting only normalizes object keys. It is not general data cleaning. Use the clean page to drop empty values and redact.