Sort rulesRecursively sort object keys ascending or descending; array order stays unchanged by default, with an option to also sort array elements.
JSON source
Load JSON
Sorted
Sorted output will appear here
Normalize JSON key order

JSON Sort Keys

Recursively sort object keys · asc / desc · optional array sort · diff-friendly

🔒Processed locally in your browser — never uploaded or stored

No upload, no storage

JSON is processed in memory and never sent to a server.

Share via URL fragment

Share links encode data in the # anchor — never sent to a server.

Remember last edit

Optionally keep your last input locally; clear it with one click.

Why use JSON Sort Keys

Recursive key sort

Keys of deeply nested objects are sorted too, for stable, consistent output.

Ascending or descending

Switch between A→Z and Z→A to match your convention.

Better diffs

With a fixed key order, two JSONs no longer diff as different just because keys were reordered.

Optional array sort

Array order is preserved by default; sort array elements too with one switch.

Local · no upload

Everything runs in your browser; data is never uploaded or stored.