🔍 JSON Diff Tool
Paste two JSON documents to see every key that was added, removed or changed between them. Nested objects are compared recursively.
How the two documents are walked
Both sides are parsed, then compared key by key. Where A and B both hold an object the comparison recurses; anywhere else the two values are serialised and compared as strings. Each difference is reported with a dotted path. The sample pair gives five:
~ changed name: "Acme" -> "Acme Inc"
~ changed version: 1 -> 2
~ changed tags: ["a","b"] -> ["a","b","c"]
~ changed meta.active: true -> false
+ added newField = "hello"
Because it works on parsed values, indentation, line endings and the order of object keys are all irrelevant - reformatting a file produces no differences at all.
Where the diff is deliberately coarse
- Arrays are compared whole. Appending one element reports the entire
array as changed, as above, and
["a","b"]against["b","a"]counts as a change - order is part of the value. - Types are not called out separately.
1becoming"1"is simply a change, so read the arrow: quotes in the second value are the clue. - A missing key is not the same as null. Dropping a key is reported as removed; setting it to null is reported as changed.
Frequently asked questions
Does the order of keys count as a difference?
No. Objects are compared by name, so moving a key up or down changes nothing. Arrays are the opposite: their order is meaningful and a reordered list is reported as changed.
Why is a whole array marked changed when I only added one item?
Element-level array diffing needs a matching rule - by index, by id, or by longest common subsequence - and each gives different answers. This tool compares arrays as single values instead, which is predictable but blunt. Compare object-keyed maps rather than lists if you need per-item detail.
Can it ignore formatting differences between two files?
That happens automatically. Whitespace, indentation, key order and the choice between
1 and 1.0 all disappear when the text is parsed, so only real
value changes are listed.