Paste two JSON documents below to see exactly what's different:

Loading...
Loading...

When to Use JSON Diff

JSON Diff compares two JSON documents and highlights every difference—additions, deletions, and changes. It's essential when you need to:

  • Debug API responses — Compare what your API returned yesterday vs. today to find unexpected changes
  • Review configuration changes — Before deploying a config update, see exactly what's different
  • Validate data transformations — Confirm your ETL pipeline produces the expected output
  • Code review JSON fixtures — Quickly spot what changed in test data files

Understanding the Output

The diff view uses standard conventions:

  • + Green lines — Added in the second document
  • - Red lines — Removed from the first document
  • Gray lines — Unchanged context

Example: Comparing API Responses

Say you're debugging why a user's profile looks different. Compare the two responses:

Yesterday's response:

{
  "id": 123,
  "name": "Alice",
  "role": "admin",
  "active": true
}

Today's response:

{
  "id": 123,
  "name": "Alice",
  "role": "viewer",
  "active": true,
  "lastLogin": "2024-01-15"
}

The diff immediately shows: role changed from "admin" to "viewer", and lastLogin was added.

Pro Tips

  • 💡 Order doesn't matter — JSON objects are unordered by spec.{"a":1,"b":2} equals {"b":2,"a":1}. Our diff normalizes this.
  • 💡 Format first — For cleaner diffs, paste minified JSON and let us format it. This ensures consistent indentation.
  • 💡 Use the Swap button — Quickly reverse the comparison direction if you pasted in the wrong order.

Common Questions

Why do two identical-looking objects show as different?

Usually it's whitespace or key ordering. Try clicking "Format" on both sides first. If they still differ, look for subtle type differences like "1" (string) vs 1 (number).

Can I compare JSON from URLs?

Not directly in this tool, but you can use the JSON Validator with the ?url= parameter to fetch JSON, then copy it here.

Is there a size limit?

The diff runs entirely in your browser. Files up to a few MB work fine; very large files (10MB+) may slow down the comparison.

Related Tools