Skip to content

JSON Diff

Compare two JSON documents structurally, ignoring key order.

About the JSON Diff

Compare two JSON documents by structure rather than as text. Reordered keys and different indentation are ignored, so what you see is only what actually changed — each with the exact path to reach it.

How to use it

  1. 1 Paste the original JSON on the left and the new version on the right.
  2. 2 Differences appear immediately, grouped as added, removed or changed.
  3. 3 Read the path column to find exactly where each change is.
  4. 4 Toggle unchanged entries on if you want the full picture.

What it does

  • Structural comparison — key order and whitespace are ignored
  • Exact path for every difference, e.g. user.roles[0]
  • Separate counts for added, removed and changed
  • Descends into nested objects and arrays instead of flagging whole subtrees
  • Distinguishes null from a missing key

Frequently asked questions

How is this different from a text diff?

A text diff compares characters, so moving a key or reindenting a file produces a wall of changes even though the data is identical. This parses both sides first and compares the values, so only genuine differences are reported.

Does key order matter?

No. JSON objects are unordered by definition, so two documents with the same keys in a different order are treated as identical. If you want a text comparison that does care about order, use the text diff tool instead.

How are arrays compared?

By position: index 0 against index 0, and so on. This means inserting an element at the start reports every subsequent index as changed. That is honest — JSON arrays are ordered, and a positional shift genuinely is a difference.

What does it do when a value changes type?

It reports a single change rather than an add plus a remove. Going from 1 to "1" or from {} to [] is one thing changing, and that is usually the bug you are hunting.

Is my data uploaded?

No. Both documents are parsed and compared in your browser. Nothing is transmitted, so comparing two production API responses is safe.