JSON Diff
Paste two JSON objects or arrays and see exactly what changed between them. Both inputs are normalised to consistent formatting before diffing, so pure whitespace differences are ignored and only real value changes are highlighted.
Last updated: May 28, 2026
Find this tool useful? Support the project to keep it free!
Buy me a coffeeWhat is JSON Diff?
JSON Diff compares two JSON documents and highlights the differences line by line. It first parses and pretty-prints both inputs with consistent two-space indentation, so the comparison focuses on actual data differences rather than formatting noise.
This is useful when debugging API response changes, comparing configuration file versions, reviewing data migration outputs, or verifying that a transformation preserved all expected fields.
How to Use JSON Diff
Paste the original JSON into the left panel
Paste the modified or new JSON into the right panel
Click "Compare JSON" to see the diff
Green lines are additions, red lines are removals, grey lines are unchanged
Common Use Cases
- API developers comparing response payloads before and after a backend change to spot unexpected field changes.
- DevOps engineers diffing Kubernetes manifest JSON exports between deployment versions.
- QA testers verifying that a data transformation or migration produced the expected JSON output.
- Frontend developers comparing Redux state snapshots to debug unexpected state mutations.
- Backend engineers checking that a refactored serialiser produces identical JSON to the original.
Example Input and Output
Spotting a changed field value and a new field added between two API response versions.
{"id":1,"status":"active","role":"user"}Changed: "status": "active" → "inactive"
Added: "lastLogin": "2026-05-28"Key ordering
If two JSON objects have the same data but keys in a different order, the diff may show false differences. Sort keys in both inputs first using the JSON Formatter tool if you need order-insensitive comparison.
Browser-side only
All diffing runs locally in your browser. Your JSON is never transmitted.
Frequently Asked Questions
Does the diff ignore whitespace differences?
Yes. Both inputs are parsed and re-serialised with consistent two-space indentation before comparison, so differences caused only by formatting or key ordering in flat objects are eliminated.
What if my JSON is invalid?
The tool validates both inputs before diffing. If either panel contains invalid JSON, an error message identifies which panel has the problem and describes the parse error.
Does this preserve key order?
JSON object key order is not guaranteed by the spec. The tool uses JSON.parse and JSON.stringify which follow insertion order in modern engines, but objects with the same keys in different order may show spurious differences.
Can I compare large JSON files?
Yes, within browser memory limits. For very large files (several MB), consider using a CLI tool like jq for comparison instead.
Is my JSON sent to a server?
No. Comparison runs entirely in your browser.
Related Tools
JSON Formatter
Format, validate, and beautify JSON instantly — with clear error messages, Tree View, Diff mode, and Schema validation.
JSON Validator
Validate JSON syntax online. Shows valid/invalid status, error location (line and column), and structure stats including type, key count, and depth.
Text Diff Checker
Compare two text blocks and see additions, deletions, and changes highlighted line-by-line using the Myers diff algorithm — like Git diff in a browser.
JSON to YAML
Convert JSON to YAML format instantly. Validates JSON before converting and produces clean, indented YAML output.
YAML to JSON Converter
Convert YAML to JSON and JSON to YAML — for config files, CI pipelines, and Kubernetes manifests.
JSON to XML Converter
Convert JSON to XML online. Nested objects and arrays are mapped to XML elements with configurable root element name and optional XML declaration.

