Compare JSON Arrays by ID
Diff arrays of objects without false positives caused by reordering. Pick an id key and the tool aligns elements before comparing.
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.
The reorder problem
If you compare two arrays of users and one has them sorted by name while the other is sorted by created_at, a positional diff reports every element as changed. Comparing by a stable identifier — id, uuid, sku, email — fixes this.
How id-based diffing works
1. Parse both arrays. 2. Index each element by the id key you choose. 3. For every id present on both sides, diff the two objects. 4. Report ids present on only one side as added/removed.
The result: a stable, order-independent diff that surfaces real changes.
Choosing an id key
Any unique scalar field works: numeric id, uuid, sku, slug, email. The tool warns if the chosen key is missing on some elements or has duplicate values, since both make the alignment ambiguous.
[
{"id": 1, "name": "Ada", "role": "admin"},
{"id": 2, "name": "Bo", "role": "user"}
]
// vs (reordered + role change)
[
{"id": 2, "name": "Bo", "role": "user"},
{"id": 1, "name": "Ada", "role": "owner"}
]
// Diff: only id=1 changed (admin → owner)When to fall back to positional diff
Ordered data — event logs, audit trails, time series — should be diffed positionally because position carries meaning. The tool defaults to positional and only switches to id-based when you choose a key.
Privacy
Pure client-side. No upload.