Compare API JSON Responses
Diff old and new API responses to catch contract drift, missing fields, changed values, and unexpected nested objects.
Paste your JSON → Get results instantly (no signup)
→ Compare these JSON inputs and return a report of changed, added, and removed fi...
1{2 "changed": [3 {4 "kind": "changed",5 "path": "plan",6 "before": "starter",7 "after": "pro"8 },9 {10 "kind": "changed",11 "path": "features.aiDraft",12 "before": false,13 "after": true14 },15 {16 "kind": "changed",17 "path": "limits.documents",18 "before": 10,19 "after": 10020 }21 ],22 "added": [23 {24 "kind": "added",25 "path": "features.apiAccess",26 "value": true27 }28 ],29 "removed": [30 {31 "kind": "removed",32 "path": "features.legacyExport",33 "value": true34 }35 ]36}Love the result?
Use this exact pipeline in your app, backend, or LLM workflow.
No setup needed. Works with curl, Node, Python.
Uses example data. For edited input, copy from the playground.
Works with:
- REST and GraphQL responses
- Webhook payloads
- Sandbox vs production
- API contract QA
Example: input → output
Compare API JSON responses
Compare API JSON responses when an endpoint changes between releases, environments, accounts, vendors, or repeated pulls. API drift is rarely obvious at first glance. A response may still be valid JSON while silently removing a field, changing a type, adding a nested object, or returning a different enum value.
This page uses the same engine as the JSON diff tool, but the workflow is written for REST responses, GraphQL results, webhook bodies, SDK output, and sandbox-versus-production checks.
Why API response comparison matters
Applications usually depend on paths and types, not on how a response is formatted. If customer.plan changes from "free" to "pro", downstream billing code might behave differently. If items.0.price changes from a number to a string, analytics or validation can fail. If a webhook removes event.type, a handler may route the event incorrectly.
A structured response diff turns those changes into a readable checklist. It separates added fields from removed fields and changed values, which helps engineering, QA, support, and integration teams discuss the impact without reading a full payload.
API diff workflow
Paste the known-good response, previous version, or production sample into the baseline side. Paste the newer response, staging response, or vendor sample into the comparison side. Run the diff, then inspect changed paths for contract drift.
Before comparing, validate both payloads with JSON Validator. If vendor responses include unstable fields such as timestamps, request IDs, or signatures, extract only the stable paths with Extract Fields from JSON. If the API returns inconsistent naming, normalize records with Normalize JSON first.
Common API response checks
Use API response comparison before releasing a backend change, upgrading a vendor SDK, modifying an OpenAPI contract, replacing a webhook provider, or debugging a customer-only production issue. It is also useful for checking whether staging and production return the same shape for the same endpoint.
For paginated APIs, compare representative pages or combine pages before diffing. For deeply nested responses, Flatten JSON can make paths easier to review. For spreadsheet handoff, convert selected comparison data with JSON to CSV.
Avoid noisy API diffs
Some API fields are expected to change every run, such as createdAt, updatedAt, requestId, traceId, and signatures. Remove or ignore those fields before comparison when they are not part of the contract you are reviewing. The cleanest report compares stable business fields, required contract fields, and values that downstream systems actually consume.
Related conversions
- JSON Diff Tool - canonical structured diff workflow for added, removed, and changed fields.
- JSON compare tool online - compare objects, arrays, files, and API payloads by path.
- JSON difference checker - changed-field reporting for debugging payload drift.
- Compare JSON files online - file-focused comparison for fixtures, configs, and exports.
- JSON diff online - browser-based no-upload JSON comparison.
- API JSON diff - compare endpoint, webhook, and SDK response changes.
- Compare JSON objects - object-level field comparison.
- JSON file diff - saved-file and fixture diff workflow.
- Find JSON changes - added, removed, and modified field detection.
Related tools
- JSON Validator - validate API payloads before comparing them.
- JSON Formatter - clean and format API payloads before diffing.
- Clean JSON - remove formatting and empty-field noise before API diffing.
- API response formatter - clean vendor, REST, GraphQL, and webhook responses.
- Extract Fields from JSON - compare only stable contract fields.
- Normalize JSON - align inconsistent API response shapes.
- Flatten JSON - review nested response paths more easily.
Related tools
- JSON ValidatorCheck JSON syntax before comparing two files or API responses
- JSON FormatterClean and format JSON before diffing, validation, or conversion
- JSON to CSVConvert JSON array row data into final CSV text output
- Clean ValuesClean noisy JSON by removing nulls, empties, duplicates, and other low-value clutter
- Flatten / NestConvert nested JSON objects, arrays, and API responses into flat key paths or rebuild them using delimiter and casing rules
Related comparisons
Read more on the blog
Advanced usage (optional)
JSON Diff / Change Report
v1.0.0Description
JSON Diff / Change Report
Compare two JSON inputs and output a structured report or focused diff subset. Accepts a primary input (the new JSON) and secondary input (the old JSON), then shows what changed, was added, or was removed between them.
How It Works
This utility requires two inputs — primary (the "new" version) and secondary (the "old" version). It performs a deep comparison and outputs results based on the selected mode.
Diff Modes
Report
Return a structured report with changed, added, and removed arrays. Entries include dot paths, kind, and either before/after values or the added/removed value.
Changed Only
Return the subset of the new JSON that differs from the old JSON. Modified and added fields are included; removed fields are excluded because they do not exist in the new JSON.
Added Only
Show only fields that exist in the primary input but not in the secondary. Useful for detecting new additions.
Removed Only
Show only fields that exist in the secondary input but not in the primary. Useful for detecting deletions.
Full Annotated
Show all fields with _diff_ markers indicating their status: "unchanged", "changed", "added", or "removed". Provides a complete picture of all differences.
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
| Diff Mode | enum | report | report, changed-only, added-only, removed-only, or full-annotated |
Use Cases
Version Comparison
- Config changes: Compare two versions of a configuration file to see what changed
- API responses: Diff API responses before and after a deployment
- Schema evolution: Identify added or removed fields between schema versions
Data Validation
- Migration verification: Compare source and target data after migration
- Sync detection: Find out-of-sync records between two data sources
- Audit trail: Track exactly which fields were modified in an update
Debugging
- State inspection: Compare application state before and after an action
- Response diffing: Compare expected vs. actual API responses
- Regression detection: Identify unexpected changes in output data
Configuration
| Name | Type | Default | Description |
|---|---|---|---|
| Diff Mode | enum | report | report: return changed, added, and removed entries with paths. changed-only: show the new JSON subset with modified and added values. added-only: show only new keys. removed-only: show only deleted keys. full-annotated: show all with _diff markers.
report changed-only added-only removed-only full-annotated |
Examples
Compare these JSON inputs and return a report of changed, added, and removed fields.1{2 "changed": [3 {4 "kind": "changed",5 "path": "plan",6 "before": "starter",7 "after": "pro"8 },9 {10 "kind": "changed",11 "path": "features.aiDraft",12 "before": false,13 "after": true14 },15 {16 "kind": "changed",17 "path": "limits.documents",18 "before": 10,19 "after": 10020 }21 ],22 "added": [23 {24 "kind": "added",25 "path": "features.apiAccess",26 "value": true27 }28 ],29 "removed": [30 {31 "kind": "removed",32 "path": "features.legacyExport",33 "value": true34 }35 ]36}API Usage
curl -X POST https://your-domain.com/api/v1/utilities/compare.json-diff \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"inputs":{"primary":{"plan":"pro","features":{"aiDraft":true,"history":true,"apiAccess":true},"limits":{"documents":100}},"secondary":{"plan":"starter","features":{"aiDraft":false,"history":true,"legacyExport":true},"limits":{"documents":10}}},"config":{"mode":"report"}}'1{2 "changed": [3 {4 "kind": "changed",5 "path": "plan",6 "before": "starter",7 "after": "pro"8 },9 {10 "kind": "changed",11 "path": "features.aiDraft",12 "before": false,13 "after": true14 },15 {16 "kind": "changed",17 "path": "limits.documents",18 "before": 10,19 "after": 10020 }21 ],22 "added": [23 {24 "kind": "added",25 "path": "features.apiAccess",26 "value": true27 }28 ],29 "removed": [30 {31 "kind": "removed",32 "path": "features.legacyExport",33 "value": true34 }35 ]36}