JSON Diff

Compare two JSON objects and instantly see what changed — added, removed, and modified keys highlighted.

How JSON Diff Works

The tool recursively compares every key and value in both JSON objects:

  • + Added (green) — key exists in B but not in A
  • − Removed (red) — key exists in A but not in B
  • ~ Changed (yellow) — key exists in both but the value differs

Nested paths are shown in dot notation (e.g., user.address.city) so you can pinpoint exactly where the difference is.

Need to format your JSON first? Use the JSON Formatter. Need to validate? Try the JSON Validator.

When to Use JSON Diff

Frequently Asked Questions

How does the JSON diff work?

The tool recursively walks both JSON objects and compares every key and value. Added keys are highlighted in green, removed keys in red, and changed values in yellow.

Is my JSON data sent to a server?

No. All comparison happens entirely in your browser using JavaScript. Your data never leaves your device.

Does it handle nested JSON objects?

Yes. The diff is recursive — nested objects and arrays are compared at every level, and the path to each difference is shown (e.g., user.address.city).

What do the colors mean?

Green (+) means a key exists in B but not in A (added). Red (−) means a key exists in A but not in B (removed). Yellow (~) means the key exists in both but the value is different (changed).

Does JSON Diff handle arrays with reordered elements?

Array comparison is index-based — element 0 in A is compared to element 0 in B. If elements are reordered, the diff will show multiple changes even though the same values are present. This is standard behaviour for structural JSON diffing; semantic array diffing (ignoring order) is not supported.

Can I compare JSON with different key ordering?

Yes. Both inputs are parsed before comparison so key order in objects does not matter. {"a":1,"b":2} and {"b":2,"a":1} will show no differences.