JSON Array Duplicate Finder

Scan any JSON array for duplicate items — exact value, by a chosen key, or with a custom equality function.

JSON Duplicate Key Finder

Detect duplicate keys that can cause data loss

Instant Scan

Detect duplicates in milliseconds

100% Private

All processing happens in your browser

No Signup

Free tool, no registration required

Duplicate JSON Keys: A Silent Data Corruption Problem

The JSON specification (RFC 8259) states that object key names "SHOULD be unique" — it's a recommendation, not a hard requirement. This means JSON with duplicate keys is technically valid text that most parsers will accept without error. The danger: different parsers handle duplicates differently. Some keep the first value, some keep the last, and some return both. You can write JSON with duplicate keys and it will parse successfully — but silently give you different data depending on which library is reading it.

Real-World Impact

Duplicate keys cause bugs that are extremely hard to track down because the JSON appears valid and the parser reports no error. Imagine a security check: {"admin": false, "admin": true}. One parser sees the first value (not admin), another sees the second (admin). This class of vulnerability has been exploited in real-world JWT and access control bypasses by sending duplicate keys to exploit parser disagreements between a validation layer and an execution layer. Beyond security, duplicate keys from code generation bugs or hand-editing often silently drop data.

Where Duplicates Come From

The most common sources of duplicate JSON keys: hand-editing a JSON file and accidentally adding a key twice, code generation bugs that emit the same field from multiple code paths, merging two JSON objects using string concatenation instead of proper object merging, and legacy APIs that were poorly designed. Linters and JSON schema validators may not catch duplicates unless explicitly configured to do so.

How to Use This Tool

Paste your JSON to scan for duplicate keys at any depth. The tool reports every duplicate key with its path, so you can locate and fix each one. Fixing duplicates before storing or transmitting JSON prevents silent data corruption downstream.

Frequently Asked Questions

Instant

Runs entirely in your browser — no upload, no wait.

100% private

Your JSON never leaves the tab. Nothing is logged.

No signup

Free, unlimited, no account required.

Three ways to compare

Strict — values must be deeply equal. Two objects are duplicates only if every field at every depth matches exactly. This is the safest mode for data integrity checks. By key — pick a property (e.g. id) and treat items as duplicates when that key matches, regardless of other fields. Useful for deduplicating records where you expect some fields to differ between occurrences but want to keep only one record per identifier. Custom — write a one-line comparator in JavaScript for full control over the equality definition. Useful for case-insensitive matching, normalized phone number comparison, or any domain-specific equality rule.

Reading the result

Duplicates are grouped, with the index of every occurrence and the count. A "remove duplicates" action lets you keep the first, last, or merge the items in each group. The index information is important for pagination bug diagnosis — if record 12 appears again at index 87, that tells you the pagination offset where the overlap begins, helping you identify the bug in the page cursor logic.

Use cases

API pagination bugs that return the same record twice, deduplicating user lists before importing into a database with a unique constraint, cleaning seed data that was generated with duplicate entries, normalizing tags arrays where the same tag was added multiple times with slightly different casing, and validating data exports before loading into an analytics warehouse where duplicate rows skew aggregations.

Performance

Strict mode uses a stable JSON-canonicalized hash, so even arrays of 100k objects deduplicate in well under a second. By-key mode is faster still — it only hashes the key field value rather than the full object. Custom mode performance depends on your comparator, but the engine handles up to 50k items before prompting to page the results.

Privacy

All processing is local.

Related tools

Frequently asked questions