JSON Sorter
Sort JSON field names alphabetically and optionally the items inside arrays too — tidy JSON that is easy to scan and to compare between versions.
How to sort JSON
- Paste your JSON on the left and the sorted result appears on the right.
- Pick A → Z or Z → A. Field names are sorted by default, and you can turn that off.
- To sort arrays as well, turn on "Sort items inside arrays". For arrays of objects, type the field to compare by, for example name.
Frequently asked questions
No. The order of fields inside a JSON object has no meaning — reordering them just makes the data easier to read and compare.
The order of items in an array often matters (for example a list of steps to run in order), so changing it could make the data wrong. Only turn it on when you're sure the order doesn't matter.
Turn on "Sort items inside arrays" and type a field name into the "By field" box, for example name or id. Items without that field always go to the end. If you leave the box empty, arrays of objects are left as they are.
Numbers go by value (2 comes before 10) and text goes alphabetically, ignoring upper and lower case. When an array mixes different kinds of values, the order is: null, false, true, numbers, then text.
No. The JSON is processed right on your device.
It's completely free, no account needed.
Related tools
JSONPath QueryExtract data from JSON with a JSONPath expressionJSON to YAMLConvert between JSON and YAMLJSON to TOMLConvert between JSON and TOMLJSON to CSVConvert between JSON and CSV tablesJSON to XMLConvert JSON to indented XMLJSON to TypeScriptGenerate TypeScript interfaces from sample JSONJSON to JSON SchemaGenerate a JSON Schema from a JSON sampleJSON Schema validatorCheck whether JSON data matches a JSON SchemaJSON to ZodGenerate a Zod schema from a JSON sample