JSON Array Sorter / Filter Builder

Sort JSON arrays and inspect filter-friendly output.

Open tool

Overview

The JSON array sorter rearranges the elements of a JSON array by a property of your choice, ascending or descending, with stable ordering for ties. It also helps with building filter expressions by showing each unique value of a field so you can spot what's worth filtering on.

Frontend developers, API consumers, and anyone exploring a paginated API response use a json array sorter to organise data before screenshotting it for a ticket or feeding it to a downstream tool. It's lighter than spinning up a JS REPL.

How it works

The input must be a JSON array; the tool refuses bare objects to make the operation unambiguous. You pick the property path (dot notation: user.name, meta.created_at) and the comparison rule. Numeric properties compare numerically; strings compare lexicographically with optional case-insensitive mode; dates are detected when the value matches ISO 8601 and compared chronologically.

Sorting is stable, meaning rows with equal keys keep their original order. The filter helper inspects the array, finds the distinct values for the chosen field, and reports their counts — handy for deciding which value to filter on next.

Examples

Input:
[
  {"name":"Alice","score":87},
  {"name":"Bob","score":91},
  {"name":"Carol","score":76}
]

Sort by score desc:
[
  {"name":"Bob","score":91},
  {"name":"Alice","score":87},
  {"name":"Carol","score":76}
]
Distinct values of "status":
  active   12
  trial     5
  churned   3

FAQ

Can I sort by a nested property?

Yes. Use dot notation — user.profile.lastSeen walks into nested objects. Array indices in the path (items.0.price) work too.

Are missing or null values handled?

Null and missing values sort to the end by default in ascending mode and to the beginning in descending. The behaviour matches what SQL NULLS LAST / NULLS FIRST provides.

Does it modify the original objects?

No — only the array order changes. Object properties stay exactly as given, so the output is a permutation of the input.

Try JSON Array Sorter / Filter Builder

An unhandled error has occurred. Reload ×