Sort JSON Keys

Alphabetically sort all keys in a JSON object, recursively, for consistent formatting.

All processing happens in your browser. No data is sent to any server.

Frequently Asked Questions

Why would I want to sort JSON keys?
Sorted keys make JSON easier to read, simplify diffs in version control (keys always appear in the same order), and help you quickly locate a specific property in a large object.
What does the Recursive option do?
When Recursive is checked (the default), keys are sorted at every level of nesting, including nested objects inside arrays. When unchecked, only the top-level keys of the root object are sorted.
Does sorting affect values?
No. Only key order is changed. All values, including nested objects and arrays, are preserved exactly as they were.
Does the tool preserve array order?
Yes. Arrays are not reordered. The tool only reorders keys within objects. Array element order is left unchanged.

Related Tools