Developer ToolsTools & Guides

Compare API Responses Online – Debug Breaking Changes Between Versions

Paste two API responses — see every structural change highlighted

No signup • Runs in browser • Free

Compare API Responses →

Your API test suite is green, but the frontend team is reporting that the user profile endpoint returns different data after the backend deploy. The response looks correct in the documentation — same status code, same top-level keys — but something changed in the nested structure. Pasting the v1 response and the v2 response into a diff checker reveals the issue in seconds: a field was renamed, an array element was restructured, a previously nullable field now always returns a value. An online diff checker makes these changes impossible to miss.

API response comparison is a manual version of snapshot testing. You capture a known-good response, make a change, capture the new response, and diff them. The diff shows exactly what the change affected — not just what you intended to change, but every other field that was touched by the same code path. This is particularly useful during refactoring, where changes to shared code can affect responses from multiple endpoints in ways that are not immediately obvious.

// GET /api/v1/user/123 — baseline response:
{
  "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "name": "Alice Chen",
  "email": "[email protected]",
  "subscription": "pro",
  "created_at": "2024-01-15T10:00:00Z"
}

// GET /api/v2/user/123 — after backend refactor:
{
  "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "full_name": "Alice Chen",        ← renamed from name
  "email": "[email protected]",
  "plan": {                         ← subscription restructured into object
    "type": "pro",
    "expires_at": "2025-01-15T10:00:00Z"
  },
  "created_at": "2024-01-15T10:00:00Z"
}
// Diff: name removed, full_name added, subscription removed, plan added

Quick summary

  • Diffing API responses finds breaking changes — renamed fields, restructured objects, new required fields.
  • Normalize dynamic fields (timestamps, request IDs) before diffing to remove noise from the comparison.
  • Prettify both responses with a JSON formatter before diffing to ensure clean, line-level output.
  • DevToolBox tools run entirely in your browser — no signup.

Breaking vs Additive API Changes

Not all API response changes are equally disruptive. Understanding the category of change determines the urgency and the communication required.

Breaking changes break existing clients without modification:

  • Removing a field that clients depend on
  • Renaming a field (namefull_name)
  • Changing a field's type (stringobject, numberstring)
  • Making a previously optional field required in a request
  • Changing the structure of a nested object or array

Additive changes can be absorbed by well-written clients without modification:

  • Adding a new optional field to a response
  • Adding a new optional parameter to a request
  • Adding new enum values to an existing field (though clients must handle unknown values)
  • Expanding a response object with additional metadata

A diff between the old and new response surfaces both types immediately. The risk is in assuming that all changes are additive when some are actually breaking — the diff makes this explicit by showing removals alongside additions.

API Response Comparison Workflow

A structured comparison workflow catches breaking changes before they reach production.

# Pre-deployment API regression workflow:

1. Before the change — capture baseline:
   curl https://api.staging.example.com/users/123 \
     -H "Authorization: Bearer $TOKEN" | jq . > baseline.json

2. Make the backend change and deploy to staging

3. After the change — capture comparison:
   curl https://api.staging.example.com/users/123 \
     -H "Authorization: Bearer $TOKEN" | jq . > after.json

4. Remove dynamic fields from both:
   # Replace timestamps, request IDs, cache headers
   jq 'del(.request_id, .response_time)' baseline.json > baseline_clean.json
   jq 'del(.request_id, .response_time)' after.json > after_clean.json

5. Diff:
   Paste baseline_clean.json into left panel
   Paste after_clean.json into right panel
   Review every highlighted change

This workflow integrates naturally into pull request review: the PR author captures both responses and includes the diff as part of the PR description, giving reviewers a concrete view of what the API change looks like to a client.

How to Compare Two API Responses

Using the DevToolBox Diff Checker to compare two API responses takes under three minutes.

  1. Capture both responses — from browser DevTools, Postman, or curl. Copy the response bodies.
  2. Prettify both — paste each into the JSON Formatter to produce consistently formatted JSON. This ensures the diff shows semantic differences, not formatting differences.
  3. Open the Diff Checker in your browser. No account, no install.
  4. Paste the baseline response into the left panel and the comparison response into the right panel.
  5. Review the diff — removed fields in red, added fields in green, changed values as paired red/green lines.
  6. For each highlighted change, classify it as breaking or additive and determine whether it is intentional.

DevToolBox tools run entirely in your browser — nothing you paste is transmitted to any server. You can safely diff responses that contain authentication tokens or internal identifiers.

Handling Dynamic Fields

API responses often include fields that legitimately differ between requests — timestamps, request IDs, session tokens, cache headers. These fields appear as changes in the diff even when nothing structurally changed. They add noise that makes it harder to spot the real differences.

// Dynamic fields that create diff noise:
{
  "request_id": "req_8f3a2b1c",        ← different every request
  "timestamp": "2024-03-27T18:00:00Z", ← changes over time
  "cache_ttl": 3600,                   ← may vary
  "user": {
    "id": "f47ac10b-...",              ← stable
    "name": "Alice Chen"               ← stable
  }
}

Before diffing, replace or remove dynamic fields:

  • Replace with a placeholder. Set request_id to "PLACEHOLDER" in both responses before diffing. The field appears in both and does not show up as changed.
  • Remove entirely. Delete timestamp from both responses if timestamp differences are irrelevant to the comparison.
  • Document the expected changes. If the diff correctly shows that cache_ttl changed from 3600 to 7200 (an intentional change), note it as expected and focus on the other changes.

For JSON manipulation in the terminal, jq is the standard tool: cat response.json | jq 'del(.request_id, .timestamp)' removes those fields before comparison.

Frequently Asked Questions

How do I compare responses from two different API versions?

Call both endpoints with the same request (same user ID, same filters, same authentication) and capture both responses. Prettify both with the JSON Formatter to normalize formatting. Diff them in the Diff Checker. The structural differences between the two versions are immediately visible. This is the same workflow as pre/post deployment comparison — the only difference is calling two different endpoints rather than the same endpoint twice.

How do I identify which changes are breaking for my clients?

Breaking changes are removals and type changes. Any field that appears in red in the diff (removed) is a breaking change if any client reads that field. Any field whose type changed (a string value replaced with an object, a number replaced with a string) is breaking. Additions (green lines for new fields) are generally safe. Review the red lines and type changes first when triaging a diff.

Can I use this for GraphQL responses?

Yes. GraphQL responses are JSON — they have the standard {"data": {...}, "errors": [...]} structure. Prettify and diff them the same way. One difference: GraphQL responses are shaped by the query, so comparing responses to the same query across server versions is meaningful. Comparing responses to different queries is less useful since the shape is intentionally different.

Conclusion

API response comparison turns the invisible into the visible. A refactoring that changes shared utility code may affect five endpoints; a diff of the responses before and after shows every field that changed across all five. This is the fastest path from "something changed" to "specifically, these fields changed, and here is whether each change is breaking or additive." The workflow takes minutes; the alternative — reading the code changes and inferring the response impact — takes considerably longer and is less reliable.

If you need a fast online diff checker that works on API responses, JSON, YAML, and any other text, DevToolBox does exactly that. DevToolBox tools run entirely in your browser — no signup, no install, nothing sent to a server.

Compare API responses and find breaking changes in seconds

Paste two response bodies — see every changed field highlighted. Free, no signup, browser-only.

Compare Responses Now →

Related Articles

Helpful tools for Developer Tools

Also read: