Toolvore

JSON Array Transformer

Sort JSON arrays by a property or remove duplicates while keeping exact numbers and the first matching item.

This tool processes its input contents in your browser instead of sending them to a processing service. Page, asset and fixed usage-measurement requests are described on the Privacy page.

Sort a JSON array or remove duplicates using a complete value or exact property pointer, while retaining numeric tokens and first-occurrence identity.

How to use it

  1. 1Paste an array or open a local JSON file.
  2. 2Choose sorting or duplicate removal and optionally select a property pointer.
  3. 3Review the record count and copy or download the complete array.

Example

Input
[3,1,2]
Output
[ 1, 2, 3 ]

What happens to your data

JSON parsing and transformation happen in this tab. No request is made with your records. Optional usage measurement omits inputs and outputs.

Last updated November 2026

API exports often contain the right records in the wrong order, or repeat the same item. Transform a top-level JSON array in one workspace: choose ascending or descending order, or remove duplicates. A property pointer such as /score selects a nested comparison value. Leave it blank to compare each complete item. The complete result is available to copy or download as JSON.

How it works

The parser keeps numeric tokens instead of immediately converting them to JavaScript floating-point values. Sorting therefore distinguishes long IDs such as 9007199254740992 and 9007199254740993, and compares decimal exponents without expanding them into enormous strings. Number spellings in retained records do not change. Equal sort keys retain their original input order. Strings use case-sensitive JavaScript code-unit order, not language-aware dictionary sorting.

Duplicate removal keeps the first record for each selected value. Object key order is ignored when comparing object values; array order is significant. Numerically equivalent tokens such as1,1.0 and1e0 count as the same value, while the retained record keeps its original token spelling. A selected property must exist in every item, so a missing key cannot silently become a duplicate of null. Sorting requires one primitive type across all selected values. Mixed types, objects as sort keys, duplicate object property names and invalid pointers produce a clear error.

This tool does not filter with arbitrary programs or evaluate JavaScript. It supports bounded inputs up to 128 KiB,24 levels and5,000 JSON values. For large exports, split the array first. Editing the input or settings invalidates the old result, preventing a download that belongs to earlier data.

Common use cases

  • Order an API inventory by an exact numeric identifier.
  • Keep the first record for each /account/id without coercing string IDs to numbers.
  • Remove repeated JSON objects even when their property order differs.

Frequently asked questions

Does it change long numeric IDs?+

No. Numeric comparison uses their decimal digits and exponent. Retained numbers are written using their original numeric tokens.

What happens when a selected property is missing?+

The conversion stops. It does not silently group missing fields together or treat them as null.

Is this the same as JSON Array Splitter?+

No. The splitter creates batches without changing selection or order. This tool sorts items or removes duplicates and returns one array.

Does duplicate removal merge records?+

No. It keeps the complete first matching record and removes later matches. It does not combine their other fields.