// IT TOOLS & CALCULATORS
| 60+ TOOLS
🔀 JSON DIFF TOOL
// Structural diff of two JSON documents — added, removed and changed values by path
ADVERTISEMENT
[ IN-CONTENT AD ]

JSON Diff Tool

Compares two JSON documents structurally — by key and value, recursively through nested objects and arrays — and reports exactly what was added, removed, or changed, with the full path to each difference. Different tool from a text diff: this understands that reordered keys in an object aren't a real change, while a text diff would flag every line as different.

Why structural diffing beats line-by-line for JSON specifically

A text diff compares strings, line by line — reformat a JSON file (different indentation, keys in a different order, everything on one line instead of pretty-printed) and a text diff shows the whole file as changed, even though the actual data is identical. JSON has no meaningful concept of key order or whitespace; two objects with the same keys and values are the same object regardless of how they're formatted or which order the keys appear in. This tool parses both documents and compares the actual data structure, so formatting differences disappear and only real data differences show up.

How to read the output

  • + (added) — a key or array index exists in B but not A
  • − (removed) — exists in A but not B
  • ~ (changed) — exists in both, but the value is different

Each difference shows the full path to where it happened — address.city, tags[2] — so you can find it in a large document immediately instead of scanning the whole thing by eye.

One honest limitation, worth knowing before you rely on it

Arrays are compared by index position, not by matching similar elements — insert a new item at the start of an array and every subsequent element shifts position, which this reports as every element from that point on being "changed," even though most of them didn't actually change, just moved. A true list-diff algorithm (like the one behind git diff) would recognise the insertion and report just that one change — this tool doesn't attempt that, since it adds real complexity for a case that's genuinely less common with JSON, where arrays are more often used as unordered sets of similar objects than as ordered sequences where insertions in the middle are expected.

Where this is actually useful

Comparing an API response before and after a backend change, checking whether a config file actually changed in a way that matters versus just got reformatted, or reviewing what a data migration script actually did to a document — all cases where you care about the data, not the text representation of it.