JSON Diff

Compare two JSON documents and see every added, removed, and changed key with its full path — runs 100% in your browser with no upload.

Differences (3)

+ added · − removed · ~ changed

~ roles[1]: "user" → "editor"
~ age: 36 → 37
+ active = true

🔒 Both JSON documents are compared in your browser — nothing is uploaded.

What this JSON diff does

Paste an original document into box A and an updated one into box B, and this tool walks both structures recursively to list exactly what changed. Every difference is reported as one of three types: added (a key or array element that exists only in B), removed (only in A), or changed (present in both but with a different value). Each entry shows the path to the value, using dot notation for object keys and bracket notation for array indices, so a nested change reads like user.roles[0]. Comparison is deep and value-aware, meaning two documents with the same content in a different key order still count as identical.

How paths and comparison work

The two text boxes are parsed as JSON and compared live as you type, so there is no button to press. Objects are matched by key and arrays by index, and when a value's type flips — for example an object becoming a number — that whole value is reported as a single changed entry rather than a flood of sub-differences. Primitive values are compared strictly, and null is treated as its own value, so changing null to 0 is a real change. If either box contains invalid JSON, an inline message points out which side needs fixing; once both parse, you can copy the full difference list to your clipboard.

Frequently asked questions

How are the paths formatted?

Object keys use dot notation and array elements use bracket indices, combined for nested data — for example user.roles[0] means the first element of the roles array inside the user object. A change at the very top level shows as (root).

Does key order or whitespace affect the result?

No. The documents are parsed first, so formatting, indentation, and the order of keys in an object are ignored. Only real differences in keys and values are reported; array order does matter because arrays are compared by index.

Is my JSON uploaded to a server?

No. Both documents are parsed and compared entirely in your browser with JavaScript. Nothing you paste is sent, stored, or uploaded anywhere.