Compare API Responses Online

Paste two API response payloads. See what was added, removed, or changed — field by field.

🔒 100% private — runs entirely in your browser

or try sample data

What is API Response Diff?

API Response Diff compares two JSON API responses and shows you exactly which fields were added, removed, or modified. Whether you're debugging a REST endpoint, tracking changes between API versions, or validating webhook payloads, this tool gives you a clear, color-coded view of every difference.

APIs evolve constantly — new fields appear, values change, and deprecated properties get removed. Comparing raw JSON payloads manually is tedious and error-prone. This tool performs a deep structural diff, walking every nested object and array element to surface changes you might otherwise miss.

Paste your API responses (from curl, Postman, browser DevTools, or any HTTP client). The comparison runs entirely in your browser — your API data is never sent to any server, making it safe for sensitive endpoints and internal APIs.

API Response Comparison — Common Scenarios

Comparing REST API versions

# Capture responses from two API versions
curl -s https://api.example.com/v1/users | jq . > response_v1.json
curl -s https://api.example.com/v2/users | jq . > response_v2.json # Paste both into the diff tool to see:
# - New fields added in v2
# - Deprecated fields removed from v1
# - Changed data types or value formats

Use jq . to pretty-print JSON before pasting. This makes the diff output more readable and helps catch nested changes.

Debugging pagination changes

// Page 1 response
{ "data": [...], "pagination": { "page": 1, "total_pages": 5, "next_cursor": "abc123" }
} // After a backend change, the pagination format may shift:
{ "data": [...], "pagination": { "page": 1, "total_pages": 5, "next": "/api/users?cursor=abc123" // field renamed + format changed }
}

Field renames and format changes are common causes of client-side breakage. The diff tool highlights these as removed + added fields.

Validating webhook payloads

// Expected webhook payload (from docs)
{ "event": "order.completed", "data": { "order_id": "ORD-001", "total": 49.99, "currency": "USD" }
} // Actual payload received
{ "event": "order.completed", "data": { "order_id": "ORD-001", "total": "49.99", // string instead of number! "currency": "USD", "tax": 4.50 // undocumented field }
}

Type mismatches (number vs string) are a common source of bugs. The diff tool flags these as modified values so you can catch them early.

API Response Comparison Gotchas

Timestamps and request IDs always differ

Fields like created_at, request_id, and trace_id change with every request. These will always show as modified in the diff. Focus on structural and data changes rather than dynamic metadata when comparing responses.

Response headers vs body

This tool compares JSON response bodies only. If you need to diff headers (like X-RateLimit-Remaining or Content-Type), include them as a JSON object alongside the body. Most HTTP clients can export headers as JSON.

Array ordering in API responses

Some APIs return arrays in non-deterministic order (e.g., database results without an ORDER BY). If array element order doesn't matter for your use case, the "Ignore array order" option can help reduce noise in the diff output.

Frequently Asked Questions

How do I compare two API responses?

Paste the JSON response bodies into the two panels and click Compare. The tool highlights added, removed, and modified fields with color-coded diffs. You can copy responses from curl, Postman, or your browser's DevTools Network tab.

Can I compare REST and GraphQL responses?

Yes. Any valid JSON can be compared. GraphQL responses typically have a data wrapper — paste the entire response including the wrapper for a complete comparison.

How do I handle timestamps that always differ?

Dynamic fields like timestamps, request IDs, and rate limit counters will always appear as modified. Focus on the structural changes (new fields, removed fields, type changes) rather than these dynamic values.

Is my API data safe?

Yes. This tool runs entirely in your browser using client-side JavaScript. Your API responses are never sent to any server, making it safe for internal APIs, staging environments, and production data.

Can I compare API responses from different environments?

Yes. A common use case is comparing responses from staging vs production, or localhost vs deployed. Paste the responses from each environment and the tool will show every field-level difference.

What about non-JSON API responses?

This tool is designed for JSON responses. For XML, plain text, or HTML responses, use the Text Diff tool instead, which does line-by-line comparison.