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 the tool, then paste the sample input below. Everything runs locally in your browser.
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
{ "id": 1, "status": "active", "total": 100 }
{ "id": 1, "status": "paused", "total": 100, "tier": "pro" }
Expected output
~ 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
- Paste the baseline JSON response.
- Paste the new JSON response.
- Run the diff.
- Review added, removed, and changed fields.
- 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.
Diff, query, format and validate JSON and API payloads — grouped in one place.
Practical example and expected result
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. In practice, this is most useful when you need a quick, repeatable check on a JSON payload before adding it to a ticket, pull request, test fixture, or support note.
A realistic input for this workflow is { "id": 1, "status": "active", "total": 100 }. The expected result should resemble { "id": 1, "status": "paused", "total": 100, "tier": "pro" }, with the same important values preserved.
Troubleshooting checklist
- Confirm you copied the complete JSON payload and not only a partial line or truncated preview.
- Run the local tool once with a safe sample, then repeat with the real data only if your team policy allows it.
- Check quoting, escaping, whitespace, encoding, timestamps, and environment-specific values before trusting the result.
- Before sharing output, remove secrets, tokens, cookies, customer data, and production hostnames that are not needed for the review.
Next useful steps
- Open this example in JSON Diff → for a related validation or follow-up step.
- Format the JSON first for a related validation or follow-up step.
- Query JSON with JSONPath for a related validation or follow-up step.
- Use Magic Box when you are not sure which tool should handle the next artifact.