Order JSON array objects alphabetically, numerically, or chronologically by any key
Sort JSON objects alphabetically, numerically, or chronologically by any property key.
Interactive Sample Data
| id | product | price | stock |
|---|---|---|---|
| 101 | Wireless Mouse | 25.00 | 150 |
| 102 | Mechanical Keyboard | 85.00 | 45 |
| 103 | USB-C Hub | 45.00 | 80 |
How this tool works
Things that usually go wrong
- Sorting by a field that contains both strings and numbers produces undefined order — normalise the field type first.
- Missing field values sort to the end.
Edge cases we tested
Parsed numerically to prevent lexical sorting errors.
Converted to UTC epoch milliseconds before comparison.
Grouped at the end (or beginning) based on user preference.
Frequently Asked Questions
Can I sort by multiple fields?
Yes — enter multiple field names and each is used as a tie-breaker.
Is the sort stable?
Yes — items that compare equal retain their original order.
Can I sort by a nested field?
Yes — use dot notation: 'user.lastName' to sort by a nested field. Arrays inside objects use index notation: 'items.0.price'.
Can I sort by multiple fields at the same time?
Yes — add multiple sort fields in order of priority. The array is sorted by the first field; ties are broken by the second field, and so on.
Does sorting preserve objects that are missing the sort field?
Yes — objects missing the sort field are placed at the end of the output in their original relative order.
Related tools
Column to Comma-Separated List
Extract a CSV column and convert it to a comma-separated list for SQL IN clauses or code arrays.
Open Tool →Comma-Separated List to Column
Convert a comma-separated, line-separated, or SQL IN list into a single-column CSV.
Open Tool →Lines to CSV
Convert plain-text newline-delimited records into structured CSV tables.
Open Tool →