JSON Key Sorter
Developer ToolsSort JSON keys A–Z, even nested
FreePrivateInstant
Similar tools you may like
History
All history →JSON Key Sorter — at a glance
Put all the keys of a JSON file in alphabetical order so it is tidy and easy to compare.
{"b":1,"a":2}
Run
{"a":2,"b":1}
How to use it — step by step
Valid JSON (an object or an array of objects).
1
Paste your input
Paste or type your content into the big input box.
2
Choose options
Pick the mode and options that fit what you need.
3
Sort Keys
Press the button. The result is created instantly on your device.
4
Copy the result
Check the output and press Copy to use it anywhere.
Pro tips
Small things that make the result better.
✦Sorted keys make Git diffs much smaller and cleaner.
✦Turn off nested sorting to sort only the top level.
✦Array order is never changed — only object keys.
Quick facts
Nestedsorts deeply
2 ordersA–Z and Z–A
Validatesshows JSON errors
Freeno signup
Frequently Asked Questions
Does it change my values?+
No. Only the order of keys changes. Values and array order stay exactly the same.
Why does it say Invalid JSON?+
The input is not valid JSON. Check for missing quotes, commas or brackets.
Is my data safe?+
Yes. Everything runs inside your own browser. Your text, files and images are never uploaded to any server.
More Free Tools
Guides you might like
All guides →JWT DecoderInside a JWT: three parts, two dots, and why decoding is not the same as trustingJSON FormatterWhy your JSON will not parse, and how to find the bad commaRobots.txt Generatorrobots.txt explained: Allow, Disallow, wildcards and the mistakes that block your siteChmod Calculatorchmod permissions explained: what 755, 644 and 777 actually mean

