Compare two JSON documents value by value: every added, removed and changed value reported with its JSONPath and before/after. Optional array-order-insensitive mode.
Show calculation steps
Processed privately in your browser — nothing you paste is uploaded, logged or stored.
A diff that understands JSON
Text diffs treat JSON as lines, so a re-ordered key or re-indented block looks like a change. This comparison parses both documents and diffs the data: every changed value shown with its before and after, every key present on only one side listed as added or removed — each finding addressed by its JSONPath so you can jump straight to it in your editor.
Worked example
Comparing an order before and after an update:
✖ 3 differences found.
Changed values (1):
$.price
A: 9.99
B: 12.5
Only in B — added (2):
$.tags[1] = "sale"
$.stock.warehouse = "B"When to use it
- Verifying exactly what an update call changed in a record.
- Comparing API responses between staging and production.
- Reviewing config drift between two environments.
- Checking a migration reproduced the data faithfully.
Limitations to know
- Arrays compare index by index; “Ignore array order” canonically sorts both sides first — right for sets, wrong for sequences.
- For key/type contract checks that should ignore values entirely, use the Structure Compare instead.
- Long values are previewed truncated in the report; the paths let you retrieve the full values from the source.
Common errors and fixes
- Everything differs — one side is probably wrapped in an extra container like
{"data": …}; unwrap it so the roots align. - “1” vs 1 reported as changed — that is a real type difference (string vs number), and one worth catching.
To turn a reviewed diff into an applicable changeset, continue to the JSON Patch Generator.
How to use the JSON Compare
- Paste the "before" document into JSON A and the "after" into JSON B.
- Optionally tick "Ignore array order" when element position is meaningless.
- Click "Compare JSON".
- Read the report: changed values with before/after, plus everything added or removed — each with its JSONPath.
Frequently asked questions
What does this comparison report?
Three lists: values that CHANGED (with both versions shown), values only in A (removed), and values only in B (added) — every entry addressed by its JSONPath so you can jump straight to it.
How is this different from Structure Compare?
This tool compares VALUES — price 9.99 vs 12.5 is a difference. Structure Compare ignores values and only checks keys and types. Debugging data uses this; checking API contracts uses the other.
How are arrays compared?
Index by index in normal mode — element 0 against element 0. With "Ignore array order" both arrays are canonically sorted first, so [1,2] equals [2,1]; use it for sets, not for sequences where position means something.
Why do I get differences on visually identical documents?
Usually types: "1" (string) versus 1 (number) differ even though they print alike. The report shows the values in JSON form, so quotes reveal exactly this case.