Skip to content

JSON Diff CompareNew

Compare two JSON documents and see added, removed and changed paths.

Runs in your browser · free · no sign-up

Left (before)

Right (after)

ChangePathLeftRight
changed$.title"Hello""Hello world"
changed$.tags[1]"b""c"
removed$.oktrue—
added$.published—true

About the JSON Diff Compare

When two API responses should match except for a timestamp or an unexpected field, a structural diff is faster than reading both files. This tool walks both trees and lists every path that differs.

Line-based diffs struggle with JSON. A single key moved to a different place looks like a deletion and an insertion, and a reordered object lights up the whole file. This comparer walks both documents as trees and reports every path that was added, removed or changed, which is the way you actually think about API responses and fixtures.

Paste an expected payload on the left and the latest response on the right. Arrays are compared by index, objects by key, and equal values disappear from the table so you can concentrate on the rest. A title that changed, a tag that was swapped, and a field that appeared only on one side each get their own row, with the left and right values shown as JSON literals.

The work stays in the tab, so you can compare payloads that contain user identifiers or tokens you would rather not put into an online pastebin. It is a complement to the code diff viewer, which is aimed at source files rather than structured data.

How to use the JSON Diff Compare

  1. 1Paste the older or expected JSON on the left.
  2. 2Paste the new or actual JSON on the right.
  3. 3Read added, removed and changed paths in the table.

Key features

  • Structural diff with added, removed and changed rows.
  • Path notation such as $.tags[1] and $.title.
  • Side-by-side editors for the two documents.
  • Clear error if either side is not valid JSON.
  • No upload; both trees are walked locally.

Practical uses

  • Checking a fixture against a live API response.
  • Reviewing what a PATCH actually changed.
  • Spotting an unexpected field a backend started to emit.

Tips and common mistakes

  • Sort or normalise volatile fields such as timestamps before comparing if you only care about business data.
  • If an array is logically a set, a shifted item will appear as several index changes; compare a sorted copy in that case.

Limitations

  • Key order is ignored, which is usually what you want, but it will not show cosmetic reorderings.
  • It does not merge documents or generate a JSON Patch file.

Privacy

Both documents remain in this browser tab and are not sent to uTooli.

Frequently asked questions

Does key order matter?

No. Objects are compared by key, not by the order they were written.

What about arrays?

Items are compared by index. A shift in the list will show several changes.

Is data uploaded?

No. Both documents stay in this tab.

Why is a number 1 and a string "1" a change?

JSON types are distinct. The tool reports that difference instead of coercing values.

Can I compare YAML?

Convert it to JSON first, for example with the YAML to JSON tool, then paste the result here.

Related tools

JSONPath & JMESPath TesterNewQuery JSON with JSONPath or a JMESPath subset.
Mock JSON GeneratorNewGenerate fake users, products or schema-based JSON for tests.
OpenAPI ViewerNewPaste an OpenAPI or Swagger document and browse its endpoints.
Webhook Payload ExplainerNewExplain Stripe, GitHub and Slack webhook samples, field by field.