JSON Sorter
Sort object keys alphabetically, optionally through the whole tree.
Loading tool…
About this tool
Reorders object keys alphabetically, which makes two documents comparable and diffs meaningful. Sorting arrays is offered separately and off by default, because array order is part of the data.
Limitations
- Array order is semantic in most documents, so arrays are left alone by default.
- Sorting keys makes two documents easier to diff, but the result is not a canonical form in the RFC 8785 sense.
Questions
- Does sorting change the meaning?
- Not for objects — JSON objects are unordered by definition. It does for arrays, which is why that option warns you when enabled.
Privacy
This page does its work in your browser. What you paste is processed by JavaScript running on your own device and is never sent to a DevToolery server — there is no server that could receive it. The page itself is a static file delivered by a CDN. See exactly what is stored.