Code tool

JSON Array Sorter

Paste a JSON array, choose fields and value types, then sort the objects locally without executing the input.

In-browser processingNo account requiredPrivacy details ↗

Use dot notation for nested fields. Missing fields sort after present values. Objects and values are preserved.

A QUICK WALKTHROUGH

How to use this tool

  1. Paste a JSON array whose items are objects.
  2. Choose a primary key, optional secondary key, direction, and value type.
  3. Sort and copy the formatted JSON result.

Object arrays only

The root value must be a non-empty JSON array and every item must be a JSON object. Empty arrays are reported clearly; objects, primitives, and nested arrays are not silently reshaped.

Safe local sorting

Input is parsed as JSON and never executed. Sorting changes object order only; object contents, unknown fields, and JSON value types are preserved.

GOOD TO KNOW

Common questions

Can I sort by a nested field?

Yes. Use dot notation such as profile.name. Missing fields sort after present values and remain unchanged.

What happens when values are missing or equal?

Missing values sort after present values. Equal values retain their original relative order.

Does the tool upload my JSON?

No. Parsing and sorting happen locally in your browser.