Skip to content

JSON Diff Checker

Compare two JSON documents by structure and inspect changed, added and removed values with JSON Pointer paths.

Local Browser Processing Free Forever No Signup Mobile Friendly

Processing stays in this browser. Inputs are not sent to a tool-processing server or saved by this utility. Limit: 500,000 characters per input.

Learn with worked examples

How to use JSON Diff Checker

  1. Paste the old document on the left and the new document in the second input.
  2. Compare and inspect each path, change type and old/new value.
  3. Verify changed fields against your API contract; object key order is ignored.

A reproducible example

Use Load example to try this input, then change one value and inspect the result.

{"user":{"id":1,"name":"Ada"},"roles":["reader"]}

Second input:
{"user":{"id":1,"name":"Ada Lovelace"},"roles":["reader","editor"]}

Compare API fixtures rather than formatted text

An API can reorder object keys without changing its meaning. This checker parses both inputs and compares objects recursively. Arrays remain order-sensitive: swapping two elements produces changes at their indexes. It is suitable for reviewing response fixtures, configuration edits and mock-data updates.

Read paths precisely

The result uses JSON Pointer paths. A change at /user/name identifies the name field inside user; /roles/1 refers to the second array element. Keys containing / and ~ are escaped as ~1 and ~0. An empty path represents a change to the entire root value.

Missing is different from null

Removing a property whose value was null is still a removal. The output identifies added, removed and changed values explicitly. It does not treat absent fields as null or coerce strings into numbers. An id of "1" differs from an id of 1.

Limits of browser JSON parsing

JavaScript numbers cannot represent every large integer exactly. If identifiers exceed the safe integer range, represent them as strings before comparing. Duplicate object keys are resolved by the browser parser, so this is not a duplicate-key detector. This output is a diagnostic report, not an RFC 6902 patch.

Common questions

Does formatting affect the comparison?

No. Whitespace and object key order are ignored after parsing.

Are arrays compared as sets?

No. Position matters. Sort or normalize records in your application first if that is your intended comparison.

Read the format or engine documentation. Found an edge case? Send a small reproducible example.