JSON Sort Keys
Sort object keys throughout a JSON document.
Valid JSON
Your input is processed locally in this browser tab.
How to use JSON Sort Keys
Paste a JSON object or array of nested objects.
Pick 2-space or 4-space indentation to reformat while sorting every object’s keys alphabetically.
Copy or download the deterministic output — ideal before comparing files.
Frequently asked questions
Are array element orders preserved?
Yes. Only object property keys are sorted recursively; array order stays untouched.
Are exact numbers and __proto__ keys safe?
Yes. The lossless AST preserves large numbers and treats keys like __proto__ safely as data.