JSON Diff / Compare Tool

Compare two JSON objects and highlight the differences.

What This Tool Does

This tool runs a structural diff between two JSON documents instead of a plain text diff, so reordered keys or different formatting never show up as false differences. Paste your original JSON into the Original JSON box and your modified JSON into the Modified JSON box, then click Run. The tool parses both, recursively walks every key (and every array index) that exists in either document, and prints one line per real difference:

When both sides have a nested object at the same key, the tool recurses into it and reports differences using a dotted path (for example user.address.city) instead of dumping the whole nested object. Arrays are compared the same way objects are, using each element's index as its "key" — see the FAQ below for what this means for reordered arrays. If the two documents are structurally identical, the output is simply No differences found.

How to Use It

  1. Paste your baseline or "before" JSON into the Original JSON textarea on the left.
  2. Paste the updated or "after" JSON into the Modified JSON textarea on the right.
  3. Click Run. The tool parses both documents and lists every difference in the output box below.
  4. Read the output top to bottom — each line's path tells you exactly where in the JSON tree the difference lives.
  5. Click Clear to reset all three fields and start over with a new comparison.

Worked Example

Suppose the Original JSON box contains:

{
  "name": "Alice",
  "age": 30,
  "active": true
}

And the Modified JSON box contains:

{
  "name": "Alice",
  "age": 31,
  "role": "admin"
}

The tool walks every key that appears in either object — name, age, active, role, in that order. name is identical on both sides, so it produces no output. Clicking Run produces exactly this diff:

~ age: 30 → 31
- active: true
+ role: "admin"

age changed from 30 to 31 (a ~ line), active only exists in the original so it's reported as removed (a - line), and role only exists in the modified version so it's reported as added (a + line).

Common Use Cases

FAQ

Does it show array element diffs?

Yes. Arrays are compared by index just like object keys are compared by name, and nested arrays or objects inside array elements are recursed into as well.

Does it detect reordered arrays as changes?

Yes, and this is a real limitation. Since array items are matched by position rather than by value, ["a","b"] vs ["b","a"] reports as two changed entries at index 0 and index 1, even though both arrays contain the same values just in a different order.

Is my data uploaded anywhere?

No. Both JSON documents are parsed and compared entirely in your browser. Nothing is sent to a server or stored.

What if my JSON has a syntax error?

If either input fails to parse, the tool shows an error message instead of a diff so you can fix the invalid JSON first.

What does "No differences found." mean?

It means the two JSON documents are structurally identical — every key, index, and value matched — even if the original text was formatted differently (spacing, key order, indentation).

Related Tools & Guides

Partner tools