🔍 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

Both documents are parsed by your own browser and never sent anywhere, so a production API response is safe to paste. Invalid JSON names the side and repeats the parser's message, including the character offset.

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.