JSON Sorter
Sorts the object keys in your JSON alphabetically; nested objects are sorted recursively and arrays are left in order.
Result
About
Useful for diffing, version control or readability when you want JSON keys in a consistent order. Arrays keep their order; only object keys are sorted, and the result is pretty-printed with 2-space indentation.
Processing happens in your browser; your data is never sent to a server.
How to use
- Paste your JSON into the box.
- The keys are sorted alphabetically automatically.
- Copy the result.
Frequently Asked Questions
- Does array order change?
- No. Arrays keep their original order; only object keys are sorted.
- What if I enter invalid JSON?
- An error message is shown; once you enter valid JSON the result appears instantly.
Other tools
Embed this tool
Copy the code below and paste it into your site's HTML to embed this tool for free. The snippet includes an attribution link back to the source.
<iframe src="https://tooldict.com/embed/en/json-sorter" title="JSON Sorter" width="100%" height="600" style="border:1px solid #e2e8f0;border-radius:16px;max-width:680px" loading="lazy"></iframe>
<p style="font:13px/1.5 sans-serif">Powered by <a href="https://tooldict.com/en/json-sorter" target="_blank" rel="noopener">JSON Sorter</a> — Tooldict</p>