Free, browser-based utilities for everyday developer workflows

Diff two JSON API responses

Paste a baseline response and a new one to see added, removed, and changed fields — a structural diff that ignores key order and formatting, so only real differences show.

Open this example in JSON Diff

Open the tool, then paste the sample input below. Everything runs locally in your browser.

Open this example in JSON Diff →

The problem

An API changed and something broke, but a raw text diff of two JSON blobs is noisy because key order and whitespace differ. You need a structural comparison that reports which fields actually changed, were added, or were removed.

Sample input

Response A
{ "id": 1, "status": "active", "total": 100 }
Response B
{ "id": 1, "status": "paused", "total": 100, "tier": "pro" }

Expected output

Diff
~ status: "active" -> "paused"
+ tier: "pro"

Only status changed and tier was added; id and total are unchanged, so they are not reported. Key order and formatting are ignored.

How to do it

  1. Paste the baseline JSON response.
  2. Paste the new JSON response.
  3. Run the diff.
  4. Review added, removed, and changed fields.
  5. Copy the differences into your report.

Common mistakes

  • Using a text diff that flags key-order and whitespace as changes.
  • Comparing a single object with an array of objects.
  • Ignoring type changes, such as a number becoming a string.
  • Diffing unsorted arrays where element order is not meaningful.
  • Forgetting that an added null is different from a missing key.

Related tools

Related guides

FAQ

How is a JSON diff different from a text diff?

A JSON diff compares structure and values, so key order and whitespace are ignored. A text diff compares characters, which flags formatting differences as changes.

Will reordered keys show as a change?

No. A structural JSON diff treats objects as unordered, so two responses with the same fields in a different order compare as equal.

Does it detect added and removed fields?

Yes. Fields present in one response but not the other are reported as added or removed, and fields present in both with different values are reported as changed.

Can it compare arrays?

Yes, element by element. If array order is not meaningful, sort both sides first so the diff does not report order as a change.

Is my data uploaded?

No. The comparison runs locally in your browser. Neither response is sent to a server.

JSON diffing runs locally in your browser. Your responses are not uploaded.

Explore more JSON and API contract tools

Diff, query, format and validate JSON and API payloads — grouped in one place.

View the JSON & API contract toolkit →