Compare Two JSON Files Online

Paste two JSON documents to see every added, removed, and changed value between them.

JSON A
JSON B

What is JSON Compare?

JSON Compare takes two JSON documents — an old version and a new one, or two API responses that should match but don't — and shows you exactly which keys were added, which were removed, and which had their value changed.

This is the kind of check that's tedious and error-prone to do by eye once a document has more than a handful of fields, especially with nested objects and arrays where a single changed value can be buried several levels deep.

How to use it

  1. Paste the original JSON into the "JSON A" box.
  2. Paste the updated JSON into the "JSON B" box.
  3. Click "Compare."
  4. Each difference appears in the summary list with its exact path (like $.user.address.city) and the before/after values.
  5. Click either pane afterward to go back and edit the JSON and compare again.

How it works

Both documents are parsed and then walked recursively, key by key and array index by array index. A key present only in B is recorded as "added," a key present only in A is "removed," and a key present in both with a different value is "changed."

The comparison is by value, not by text — so re-ordering an object's keys (which JSON treats as equivalent) doesn't register as a difference, only actual content changes do.

Example

Comparing an old and new user record:

A: {"name":"Ada","role":"editor"}
B: {"name":"Ada","role":"admin","active":true}
Result:
changed $.role "editor" → "admin"
added $.active true

Frequently asked questions

Does it matter which document goes in box A vs box B?

Yes — A is treated as the "before" and B as the "after." A key only in A shows as removed; a key only in B shows as added.

Can it compare JSON arrays, not just objects?

Yes. Arrays are compared index by index, and the same added/removed/changed logic applies to array items.

Does key order matter?

No — two objects with the same keys and values in a different order are treated as identical, matching how JSON itself works.

Is there a size limit?

No hard limit is enforced — it's bounded only by your browser's available memory, since everything runs locally with no upload.

Is my data sent anywhere?

No. Both documents are parsed and compared entirely in your browser; neither is ever transmitted to a server.