Contact

Tools  /  JSON  /  Array Deduplicator

Array Deduplicator

Remove duplicates from a JSON array, comma list, newline list or whitespace list -- exact, case-insensitive, trimmed, loosely-numeric, or by an object key match, keeping the first or last occurrence, with a removed-items panel, output sorting, several input/output formats and stats. Nothing is uploaded.

What this tool does

Paste a JSON array, a comma-separated list, a newline list, or plain space-separated text — the format is auto-detected — and get back the same list with duplicates removed. Most dedupe tools stop at exact matching on simple values; this one handles arrays of objects too, and shows you what was actually dropped rather than only the result.

Five ways to decide what counts as a duplicate

Two values rarely match by pure luck when they should be treated as the same thing, so matching isn't limited to exact equality:

  • Exact — values must be identical.
  • Case-insensitive — "Apple" and "apple" collapse to one.
  • Trim whitespace — "value" and " value " collapse to one.
  • Loose1 and "1" are treated as the same value.
  • By object key — when the array holds objects, dedupe on one field (an id or an email, say) instead of comparing whole objects, which is the one real-world case a simple "make it unique" pass can't handle at all.

Keep first or keep last decides which occurrence survives when two entries collide.

Seeing what got removed

The result comes with a separate panel listing every duplicate that was dropped, plus a count and what percentage of the input that was. That matters whenever "how many duplicates were there, and were they really duplicates" is worth checking before you trust a cleaned list — a plain unique-values tool never gives you that chance, since the discarded items are simply gone.

Formats in, formats out

Input auto-detects as a JSON array, a comma list, a newline list, or whitespace-separated text — or you can force one. Numbers, booleans and even nested JSON can be parsed to their real type rather than staying as text, so "1" and 1 can be compared as numbers when that's what you want. Output can be JSON (compact or pretty-printed), a comma list, or a newline list, optionally sorted ascending or descending.

Privacy

Parsing and deduplication both happen in your browser. Nothing you paste, drop, or load from a file is sent to a server.

Frequently asked questions

Is my data uploaded anywhere?
No. Parsing, matching and deduplication all run locally in your browser — nothing is sent to a server.
Can it dedupe an array of objects, not just plain values?
Yes — pick "By object key" and give it a field name (an id or an email, for example). It compares just that field instead of the whole object, which is what you actually want when two records represent the same thing but aren’t byte-for-byte identical.
What’s the difference between exact, case-insensitive, trim and loose matching?
Exact requires identical values. Case-insensitive treats "Apple" and "apple" as the same. Trim ignores surrounding whitespace. Loose treats 1 and "1" as equal instead of comparing type and value strictly.
Does it show me what got removed?
Yes — a separate panel lists every duplicate that was dropped, along with a count and the percentage of the input that represents. Most dedupe tools only show the unique result and discard that information.
What input formats does it accept?
A JSON array, a comma-separated list, a newline-separated list, or plain whitespace-separated text — the format is auto-detected, or you can pick one explicitly if auto-detection guesses wrong.
What does "keep first" vs "keep last" control?
When two entries are duplicates, this decides which one stays in the result — the earliest occurrence in the input, or the latest one.
Theme Accent