JSON Diff / Compare

Compare two JSON objects side-by-side to find differences.

Diff Result

About JSON Diff

Comparing two JSON documents byte-for-byte is rarely useful — the order of object keys, whitespace and trailing commas all create false positives. A semantic JSON diff parses both sides into structured trees and reports the differences in terms of added, removed, and changed keys. This is what you actually want when reviewing API contract changes, regression-testing event payloads, or comparing a database snapshot before and after a migration. (For free-form text, use our text diff tool instead.)

The diff runs in your browser, so even sensitive payloads (audit logs, internal API responses) can be compared safely without leaving your machine.

How to use

  1. Paste the original JSON into the left pane.
  2. Paste the updated JSON into the right pane.
  3. The middle column highlights every difference: added keys in green, removed in red, modified in yellow.
  4. Use the Format buttons first if either side is minified.

Common use cases

  • Verifying that a refactor of an API response keeps the public contract intact.
  • Reviewing JSON-encoded events emitted by two versions of a service.
  • Spot-checking that a database export matches a known-good baseline.
  • Auditing infrastructure-as-code state files for unintended drift.

Frequently asked questions

Does the diff care about object key order?

No. JSON objects are unordered by spec, so two objects with the same keys in different orders are reported as identical.

Does the diff care about array order?

Yes. Arrays are ordered, so [1,2,3] is different from [3,2,1]. If you want order-insensitive comparison, sort both arrays before pasting.

How large can the inputs be?

The tool handles documents of a few megabytes comfortably. For very large payloads, consider streaming diff tools at the command line.

Advertisement