Online JSON Diff — Compare Two JSON Documents Visually

Paste two JSON payloads and highlight structural differences. Useful for API regression checks, config reviews and debugging. Nothing is uploaded.

Loading…
JSON diff, comparison playbook
Compare two JSON documents side by side and highlight structural differences. The summary counts changed, added, removed and unchanged paths and lists the affected ones. Everything stays in your browser.

Developer notes

Both panels must contain valid JSON before Compare runs. Key order is ignored. Two objects with the same keys and values are identical, whatever their order. Arrays are aligned, not compared position by position. An item inserted in the middle shows as one addition, and the items after it are not reported as changed. A reordered array still shows differences, because a moved item appears as one removal and one addition. Keys-only mode ignores changes of value and type. Use it to spot schema drift. Paths in the summary use dots between keys, for example limits.maxRequests. A change inside an array is counted once, on the path of the array.

Comparison options

Compare keys only
Ignore changes of value and type and report only added or removed keys.
Full diff
Show the whole document in the diff, with unchanged keys and values around the changes.

When teams pick this route

API regression checks between staging and production responses. Config reviews when Helm or Terraform exports JSON snapshots. Debugging feature flags or A/B payload differences. Validating converter round-trips before merging.

Worked examples

Feature flag flip

Original JSON

{ "feature": "checkout-v2", "enabled": false, "rollout": 0, "limits": { "maxRequests": 1000, "burst": 50 }, "regions": ["eu-west", "us-east"] }

JSON to compare

{ "feature": "checkout-v2", "enabled": true, "rollout": 25, "limits": { "maxRequests": 2000, "burst": 100 }, "regions": ["eu-west", "us-east", "ap-south"] }

Nested key added

Original JSON

{ "user": {"id": 42, "name": "Ada"} }

JSON to compare

{ "user": {"id": 42, "name": "Ada", "role": "admin"} }

Navigate related tools

For free text (not JSON), use text diff. Browse the JSON tools hub. Merge two documents, then verify with JSON diff. The diff ignores key order. To read two documents in the same order, sort them with JSON sort. Validate inputs with the JSON validator, or prettify via the JSON formatter.

JSON diff FAQ

Structural comparison expectations

What counts as a difference?

Changed values, added keys, removed keys and type changes (1 against "1", for example) are highlighted. Key order does not count. Identical documents report no differences.

Keys-only mode?

When enabled, changes of value and type are ignored and only added or removed keys are reported. This helps when you only care about schema shape.

Array order?

Arrays are aligned rather than compared by position. An inserted or removed item shows as a single addition or removal, and the items around it stay unchanged. A moved item is reported as a removal plus an addition.

Is data uploaded?

No. Both payloads are compared entirely in your browser.

Can I diff YAML or XML directly?

Convert to JSON first using our format converters, then paste both JSON documents here.

Validate, format, repair, compare and explore JSON in your browser, alongside the JSON minifier and converters.