JSON Diff Checker

Compare two JSON documents and see what actually changed, not what merely moved. Object keys are matched by name, so reordering them counts as no difference — which is the whole point, because serialisers emit keys in whatever order they like and a plain text diff on two pretty-printed files then lights up as entirely changed when nothing meaningful has. Arrays are compared by position, since JSON arrays are ordered and pretending otherwise would hide a real reordering. Every difference comes with a path you can use to find it, marked added, removed or changed, and a type change is reported as one edit showing both values rather than as a deletion plus an insertion. Both documents are parsed in your browser and neither is uploaded.

What counts as a difference

SituationReported as
Key order changedNo difference
Indentation changedNo difference
Value changedChanged, with both values
Type changedOne change, not add plus remove
Key added or removedAdded or removed
Array element reorderedChanges at the affected indices
null vs missing keyRemoved — they are not the same

When to use it

  1. See what changed between two API responses.
  2. Compare a config file before and after a deployment.
  3. Check which fields a library added to its output after an upgrade.
  4. Verify a migration produced the data you expected.
  5. Prove that two differently-formatted documents are actually identical.

How to Use

  1. Paste the original document on the left.
  2. Paste the changed document on the right.
  3. Read the differences, each with its path, and copy the report if you need it.

Features

  1. Structural comparison — key order is not a difference
  2. Arrays compared by index, as their order is meaningful
  3. Every difference labelled added, removed or changed
  4. A JSONPath for each difference
  5. Type changes shown as one edit with both values
  6. Null distinguished from a missing key
  7. Copyable plain-text report
  8. 100% client-side

FAQs

Are my documents uploaded?

No. Both are parsed and compared in your browser. API responses and config files often carry credentials and customer data, so this matters more than for a typical formatting tool.

Why does a text diff show changes that this does not?

Because a text diff compares characters and lines. If a serialiser writes the same data with keys in a different order, or with different indentation, every line looks changed. This compares structure, so only real differences appear.

Are arrays compared by position or by content?

By position. JSON arrays are ordered, and treating them as sets would hide a reordering that genuinely changes meaning. Moving an element is therefore reported as changes at the affected indices.

What does a type change look like?

One entry marked changed, showing both values — so `1` becoming `"1"` is a single edit rather than a removal plus an addition. Describing it as two would obscure the fact that it is the same field.

How is null handled?

As a value, not an absence. A key going from null to missing is a removal; null becoming 1 is a change. Plenty of APIs use those two states to mean different things, so collapsing them would be wrong.

Technical Details

The comparison is structural rather than textual. Object members are matched by key name, so reordering keys reports no difference at all — which is the entire reason to use this instead of running a text diff over two pretty-printed files, since serialisers routinely emit keys in different orders and a line diff then shows the whole document as changed. Arrays are compared by index, because JSON arrays are ordered and treating them as unordered sets would hide a genuine reordering that changes meaning. Every difference is reported with a JSONPath so it can be located in the original, and classified as added, removed or changed. A change of type is reported as one change with both values rather than as a removal plus an addition, since `1` becoming `"1"` is one edit and describing it as two obscures what happened. Null is treated as a value rather than an absence, so a key going from null to missing is a removal while null becoming 1 is a change — a distinction that matters because plenty of APIs use the two to mean different things. Comparison starts with an identity check, which makes unchanged subtrees free, and recursion stops at the first type mismatch rather than descending into two shapes that cannot be compared. Both documents are parsed and diffed in your browser.

Developer Tools

Developer Tools

  • JSONPath Extractor
  • JSON Schema Generator
  • License Generator
  • Nanoid Generator
  • Random String Generator
  • Test IBAN Generator
  • UUID Generator
  • Regex Tester