About the JSON Key Sorter
Two JSON files with the same data can look completely different in a diff if their keys are in a different order. Sorting keys alphabetically makes configs, translation files and API fixtures easy to compare and review.
Nested objects (and objects inside arrays) are sorted too unless you turn that off. Array order is never changed, because it is meaningful.
How to use the JSON Key Sorter
- Paste JSON.
- Choose deep sorting and indentation.
- Copy or download the sorted JSON.
Features
- Recursive key sorting
- Array order preserved
- 2/4 spaces, tab or minified
- Clear errors for invalid JSON
Supported formats
- Plain text
Frequently asked questions
Does sorting change the meaning of JSON?
No. Object key order has no meaning in JSON, so the data is identical.
Is my text sent anywhere?
No. Everything runs in your browser, so nothing you paste is uploaded or stored.
Added · Last reviewed · Maintained by Sohail Khax · How we test tools