JSON Compare
Diff two JSON documents and see every added, removed, and changed value.
Original (left)
Changed (right)
Differences
Enter JSON on both sides to compare.
What is JSON Compare?
JSON Compare is a structural diff tool that takes two JSON documents and reports exactly which values were added, removed, or changed, each identified by its path (for example items[2].name). It parses both inputs and compares the resulting values, so whitespace and key ordering are ignored and only actual differences in keys and values surface. Arrays are compared positionally by index, which means inserting an element in the middle shows every element after it as changed rather than a single insertion. When a value's shape genuinely can't be compared piece-by-piece — an object versus an array at the same path, or two documents that are bare primitives rather than objects — the whole path is reported as one "changed" entry rather than a partial diff, and a difference between two fully primitive-rooted documents surfaces under the special path `(root)`. It runs entirely in your browser, so nothing you paste is transmitted anywhere.
How to use JSON Compare
- Paste the original JSON into the left box and the changed JSON into the right box.
- The difference list updates instantly, showing every added, removed, and changed value by its path.
- Object keys are compared regardless of order — only actual value differences are reported.
- Array elements are compared by index; extra trailing elements on either side show up as added or removed.
Examples
Changed value
Input
Left: {"a":1} Right: {"a":2}
Output
a: changed 1 → 2
Added key
Input
Left: {"a":1} Right: {"a":1,"b":2}
Output
b: added (2)
Nested path
Input
Left: {"user":{"name":"Ada"}} Right: {"user":{"name":"Grace"}}
Output
user.name: changed "Ada" → "Grace"
Comparing two root-level primitives
Input
Left: 1 Right: 2
Output
(root): changed 1 → 2
Common mistakes
- Assuming this does a "smart" line-based diff like a text/git diff — it's a structural JSON diff, so reordering array elements shows up as changes even if the same values are still present.
- Comparing minified JSON against pretty-printed JSON and expecting whitespace to matter — only the parsed values are compared, not formatting.
- Forgetting that JSON has no "undefined" — a key that's genuinely missing shows as added/removed, while a key explicitly set to null is a real value and will show as changed if the other side differs.
- Expecting a field that changed type (an object that became a string, say) to produce a nested list of sub-changes — it's reported as a single "changed" entry at that path, since there's no shared shape left to diff into.
- Comparing two documents that are each a single primitive value rather than an object or array and expecting a per-field diff — with nothing to key into, the whole comparison surfaces under the special path (root).
Why use this tool
- Path-based diff output tells you exactly where a difference is, not just that the documents differ.
- Ignores key ordering, focusing only on actual structural and value differences.
- Clear, separate error messages when either side fails to parse, instead of one generic failure.
- Runs entirely client-side — nothing you paste is sent anywhere.
- A results badge summarizes "Identical" or the exact difference count before you scroll through the full path-by-path list.