JSON Diff
Compare two JSON documents by structure, not by line order. Object key order does not matter, and every change is reported with a JSON path.
Left (old)
Right (new)
Differences
Paste two JSON documents and compare them.
How the comparison works
- Objects are compared by key, so changing key order produces no differences.
- Arrays are compared by index. Inserting an item in the middle therefore shifts later indices.
- Types matter:
1,"1",trueandnullare different values. - JSON paths use
$for the root, dots for identifiers and brackets for other keys or array indices. - Number precision: both sides are parsed with
JSON.parse, so numbers use IEEE-754 doubles. Integers above2^53-1may compare equal after rounding, and1.0compares equal to1.