JSON Compare

Paste two JSON objects to see a field-by-field diff - what's added, removed, or changed between them.

Last updated: September 5, 2026

Frequently asked questions

How does this JSON compare tool work?

It parses both JSON objects, then recursively walks every key: keys only in the first are marked "Removed," keys only in the second are marked "Added," and keys present in both with different values are marked "Changed." Nested objects are compared field by field, not as one big blob.

Does this compare arrays element by element?

Arrays are compared by exact value (the whole array is treated as "changed" if any element differs), not merged element-by-element like objects - this keeps the diff logic predictable for arrays where order matters.

What happens if my JSON has a syntax error?

This tool reports which of the two JSON inputs is invalid, along with the parser's error message, rather than attempting a partial or guessed comparison - fix the syntax error first, then compare.

If a key exists in both JSON objects but has the exact same value, does it show up in the diff?

No - only keys that differ (added, removed, or changed in value) appear in the results. Identical keys with identical values are considered unchanged and aren't flagged.

In the default example, what's the difference between the two JSON objects?

"age" is changed (30 to 31), "city" is removed (only in the first JSON), and "country" is added (only in the second JSON) - "name" stays the same in both, so it's not flagged.

Does key order in the JSON matter for the comparison?

No - the comparison is based on key names and values, not the order keys appear in the text, since JSON objects are inherently unordered collections of key-value pairs by specification.

Calculate