Find keys defined more than once in the same object — the values your JSON parser silently throws away. Works on the raw text, with line and column for every duplicate.
Show calculation steps
Processed privately in your browser — nothing you paste is uploaded, logged or stored.
The bug your parser hides from you
When one object defines the same key twice, virtually every JSON parser keeps the last value and throws the first away — silently. By the time your code sees the data, the evidence is gone. This tool scans the raw text before parsing, so it can list every duplicate with the line and column of both the original definition and the repeat.
Worked example
{
"name": "first value",
"config": { "debug": true, "debug": false },
"name": "second value wins"
}Report:
✖ 2 duplicate keys found.
"debug" — duplicated at line 3, col 30 (first defined at line 3, col 15)
"name" — duplicated at line 4, col 3 (first defined at line 2, col 3)When to use it
- Auditing hand-edited config files after a merge conflict.
- Debugging “my value keeps coming back wrong” mysteries — a duplicate later in the file may be overwriting it.
- Checking JSON assembled by string concatenation, where duplicates creep in easily.
Limitations to know
- The document must otherwise be valid JSON — syntax errors are reported first, with their own location.
- Only same-object duplicates count; the same key in sibling objects (every array element having an
id) is normal structure, not a duplicate.
After you find one
- Decide which value is correct, remove the other, and re-run the JSON Validator — it also flags duplicates as warnings during routine checks.
How to use the JSON Duplicate Key Finder
- Paste your raw JSON text (do not run it through another tool first).
- Click "Find duplicates".
- Each duplicate is listed with its key name, line and column, plus where it was first defined.
- Rename or remove one of each pair in your source.
Frequently asked questions
Why can't I find duplicate keys after parsing JSON?
Because parsing destroys the evidence: JSON.parse and equivalents keep only the last value for a repeated key. This tool scans the raw text before parsing — the only place duplicates still exist.
Are duplicate keys illegal in JSON?
RFC 8259 says object names "SHOULD be unique" — not MUST — so duplicates are technically legal but interoperability poison: different parsers may keep the first value, the last, or error. Treat every finding as a bug.
Is the same key in two different objects a duplicate?
No. Every array element having an "id" key is normal structure. A duplicate means one single object literally defines the same key twice — that is the only pattern this tool reports.
Where do duplicate keys come from?
Mostly hand-edited config files, sloppy string concatenation when building JSON, and bad merges. They also appear when two code paths both "add" the same field to a template.