Sample (Before / After)
Input
{"b":1,"a":{"d":4,"c":3},"arr":[{"y":2,"x":1},3]}
Automatically standardize JSON key order to make reviews and comparisons easier.
Choose all levels or top level only. Array order stays intact.
Sort and format JSON in one step, then copy or download the result.
Shortcut: Ctrl / Cmd + Enter to run
Input
{"b":1,"a":{"d":4,"c":3},"arr":[{"y":2,"x":1},3]}
All-level sort (2 spaces)
{
"a": {
"c": 3,
"d": 4
},
"arr": [
{
"x": 1,
"y": 2
},
3
],
"b": 1
}
Top-level only sort
Top-level keys are reordered to a, arr, b, while key order inside "a" stays as entered.
Yes. You can choose all levels or top level only.
Array element order is preserved. Objects inside arrays are sorted depending on your selected scope.
Input formatting is not preserved. Output is reformatted using your selected indentation style.
No. This tool targets standard JSON only.
Everything runs locally in your browser. Your input is not sent to a server.