DataToolsLab
JSON Tools

JSON Diff

Compare two JSON documents structurally.

Loading tool…

What is JSON Diff?

The JSON Diff tool compares two JSON documents structurally rather than as plain text. Re-ordered keys, whitespace, and number-formatting differences are not flagged — only real semantic differences are surfaced as added / removed / changed entries with their full paths.

How it works

Both documents are parsed with our hand-rolled tokenizer. We then walk the two trees in lockstep, emitting a JSON Pointer for every path that differs. Arrays are compared index-by-index by default; the 'Ignore array order' option treats them as multisets (useful for lists where insertion order doesn't matter).

  1. Paste both documents. Drop or paste the 'before' document on the left and the 'after' on the right. Both panels support file drop.
  2. Choose a view. Toggle Unified (inline +/−/~ markers) or Side-by-side. Toggle 'Ignore array order' for multiset array comparison.
  3. Read the diff. Each entry shows the JSON Pointer path with the before and after values. Use the +/−/~ counters to gauge the size of the change at a glance.

Examples

API response version drift

Paste an old API response on the left, the new one on the right; the diff lists every field that was added, removed, or had a type change.

Config drift across environments

With 'Ignore array order' enabled, drift in an unordered list (e.g. feature flags) shows only meaningful key/value changes.

Common mistakes

Treating whitespace as a diff

Structural diffs ignore whitespace and key order. If you're reviewing a config change in a file that does reorder keys, use a text diff tool instead.

Trusting array indices blindly

By default index 0 in A is compared to index 0 in B. If your array is unordered, enable 'Ignore array order' for a cleaner view.

Alternatives

JSON Patch Generator

Convert this diff to RFC 6902 patch operations.

JSON Merge

Merge two documents and resolve conflicts interactively.

Frequently asked questions

Why are key reorders not flagged?

Plain text diff tools are noisy for JSON because re-ordering keys or whitespace can hide real changes. Structural diffing shows only what's semantically meaningful.

Can I export the diff as a patch?

Wave 2 ships the diff view; the JSON Patch Generator tool that consumes this diff is planned for Wave 3.

Online