JSON Diff

Compare two JSON documents by what they mean, not how they're written. Key order, whitespace and number formatting (1.0 vs 1) are ignored, arrays of records are matched by their id, and every real change is listed with its path.

Original

Changed

Arrays

Differences

Columns: line in Original, line in Changed. Click a line to find it in the inputs.
Paste JSON on both sides to compare.

Why compare JSON semantically?

A text diff compares characters, so two JSON files that hold exactly the same data can look completely different: an API that returns keys in a different order, a formatter that changed the indentation, 25.50 written as 25.5, or "café" written as "café". This tool parses both documents first and compares the values, so only real changes show up. It's useful for comparing API responses between environments, checking what a migration changed in a config file, reviewing snapshot test failures, or comparing Terraform, Kubernetes and package-lock JSON.

How arrays are compared

Ignoring keys

List keys to skip, separated by commas. A plain name such as updatedAt is ignored at any depth. A dotted path such as meta.requestId starts at the root, and * matches any part of a name or any one level (*.etag, items.*At). Array positions are skipped in paths, so orders.total means the total of every order. Ignored keys are greyed out in the diff view and left out of the patch.

The JSON Patch output

The patch tab gives the same changes as a standard JSON Patch (RFC 6902), which libraries in most languages can apply, and which kubectl patch --type json accepts. For example:

[
  {"op": "replace", "path": "/email", "value": "ada.lovelace@example.com"},
  {"op": "add", "path": "/roles/2", "value": "billing"}
]

When arrays are matched by id or in any order, new items are added at the end (/-), so the patched array holds the same items but may be in a different order.

Numbers, comments and duplicate keys

Is my data safe?

Yes. Both documents are parsed and compared by JavaScript in your browser. Nothing you paste or open is uploaded, so it's fine to compare responses that contain tokens or customer data. Only your option choices are saved on this device.