Sort JSON keys
Put object keys in a consistent order without rearranging arrays.
Sorts every object’s keys with a case-sensitive character comparison, preserving array order and values. JavaScript serializes integer-like keys numerically. Unsafe unquoted integers are rejected. Use double-quoted property names and valid JSON values. Results update as you type. Up to 1,000,000 characters.
Your result
How to use Sort JSON keys
- Paste valid JSON. Keys in every nested object are sorted with a case-sensitive character comparison. Copy or download the formatted result.
- The outer object orders a before z; the nested object orders b before y. Array items keep their original order. Integer-like keys follow JavaScript numeric key ordering.
Useful next steps
How to use it
Paste valid JSON. Keys in every nested object are sorted with a case-sensitive character comparison. Copy or download the formatted result.
Try a small example
The outer object orders a before z; the nested object orders b before y. Array items keep their original order. Integer-like keys follow JavaScript numeric key ordering.
What to know
Sorts every object’s keys with a case-sensitive character comparison, preserving array order and values. JavaScript serializes integer-like keys numerically. Unsafe unquoted integers are rejected.