JSON workflow
How to compare two JSON API responses
When an API changes, a side-by-side JSON comparison helps you spot renamed fields, changed values, missing array items, and unexpected response structure changes.
Compare JSON nowBest workflow
Copy the old response into the original field and the new response into the changed field. If the JSON is minified, format both responses first so object keys and nested arrays line up cleanly.
What to check
- Renamed keys that can break frontend or integration code.
- Changed data types, such as a number becoming a string.
- Missing required fields in success or error responses.
- New fields that should be documented or mapped.
Useful next tools
Beautify JSON, Validate JSON, and JSON to TypeScript can help after the comparison.
Example comparison scenario
Imagine a production API response includes userId, status, and plan, while a new staging response adds billingStatus and changes plan from a string to an object. A visual JSON diff makes those changes easier to review than scanning two raw payloads.
Before sharing a comparison result, remove bearer tokens, session identifiers, email addresses, or customer-specific values. Keep only the fields needed to understand the structure change.
If the diff shows many changes caused only by formatting, run the JSON beautifier first on both payloads. Once both sides use consistent indentation, meaningful field-level changes become much easier to see.
After the diff
Use the JSON to TypeScript generator when the updated response should become a typed frontend model, or generate a JSON Schema when you need validation rules for an API contract.
Troubleshooting noisy JSON diffs
If every line appears changed, the two payloads probably use different spacing or key ordering. Beautify both responses, remove volatile fields such as timestamps or request IDs when they are not relevant, and run the comparison again. For arrays, confirm whether order matters before treating every moved item as a business logic change.
Example workflow
Start with a small representative sample instead of a full production file. Run the matching tool, inspect the result, and only then repeat the workflow with the complete content. This helps catch formatting, encoding, or data-shape problems while the input is still easy to review.
When the output looks correct, copy or download the result and keep a note of the source, date, and settings you used. For team workflows, link the relevant guide and tool together so another reviewer can reproduce the same check later.
Final review checklist
- Confirm the input is safe to handle in a browser and does not contain secrets.
- Run the tool with a small sample before processing a larger file.
- Review the output for structure, formatting, and unexpected changes.
- Use the related tools when the workflow needs validation, comparison, cleanup, or conversion.