JSON Formatter / Minifier / ValidatorJSON Escape / UnescapeJSON DiffSort JSON KeysJSON ⇄ StringJSON ⇄ XMLXML ⇄ JSONJSON to CSVCSV to JSONJSON ⇄ YAMLJSON to CodeQuery Params ⇄ JSONCookie ⇄ JSONJSON ⇄ Properties
Sort JSON Keys
Recursively sort all object key names in alphabetical order
How to use
- Paste the object or array to sort into "JSON input".
- Choose ascending (A→Z) or descending (Z→A) in "Direction".
- Click "Sort"; keys are recursively ordered alphabetically on the right.
- Tip: array order is kept; only object keys are sorted, handy for version-control diffs.
FAQ
Does sorting change the meaning of the data?
No. Key order in a JSON object is semantically meaningless. Sorting only makes the output more readable and easier to diff in version control.
Will arrays be sorted?
No. Array element order is meaningful; this tool only sorts object keys and leaves arrays untouched.