JSON Diff
Compare two JSON documents semantically — see exactly what changed, added, or was removed, path by path.
JSON A (original)
JSON B (modified)
About this tool
A semantic JSON diff tool that compares two JSON objects by structure, not by line. Keys are compared regardless of order, and every change is reported with its full dot-path (e.g. $.user.email) so you know exactly where in the document each difference lives.
How to use it
Quick steps to get the most out of this utility.
- 1
Paste original JSON
Drop the baseline JSON document into the left panel, or click "Load sample" to use the built-in user-record example.
- 2
Paste modified JSON
Paste the updated version into the right panel.
- 3
Read the diff
Each changed field appears with its path (e.g. $.user.email), old value, and new value.
- 4
Copy or share
Use the Copy button to export the diff as plain-text lines for a PR comment or incident report.
Semantic diff vs text diff
Paste two JSON responses that differ only in key ordering into a text diff tool and you'll see dozens of “changed” lines even though the data is identical. That's because text diff works line by line — it has no understanding of JSON structure.
A semantic diff parses both documents and walks the object graph recursively. Two objects are equal if they have the same keys with the same values, regardless of the order those keys appear in the source. This is almost always what you actually want when comparing API responses or configuration snapshots.
Real-world use cases
- API response testing: Confirm a refactored endpoint returns the same payload as the old one.
- Config management: Compare a staging config snapshot against production to catch drift.
- Incident investigation: Check what changed in a feature flag payload between two deploys.
- Database migrations: Diff a before/after record to verify only the intended columns changed.
Limitations to know
Arrays are compared by position, not by identity. If you shuffle the items in an array, the diff will report many changes even if all the same elements are present. If your use case requires set-based array comparison (e.g. “same items, different order = no diff”), you'll need to sort the arrays before pasting them here, or use a library like deep-equal with custom comparators.
Frequently asked questions
How is this different from a plain text diff?+
A text diff is line-by-line — if you reorder two keys in an object, it shows everything as changed even though the data is identical. A semantic JSON diff understands structure: it compares keys regardless of their order, so only genuine changes (added keys, removed keys, changed values) appear in the results.
Can it diff arrays?+
Yes. Arrays are compared position by position. If element 0 changed, the diff shows index [0] as changed. If elements were added to the end, those appear as additions. For very large arrays where order changed completely, a semantic array diff would need a longest-common-subsequence algorithm — this tool uses positional comparison, which covers the vast majority of real-world cases.
Does it handle nested objects?+
Yes — the diff recurses through arbitrarily deep nested objects and arrays, reporting changes with their full dot-path (e.g. $.user.address.city).
Is my JSON data uploaded anywhere?+
No. Both inputs are processed entirely in your browser using JavaScript. Nothing is sent to a server.
What does the flat path notation mean?+
Each diff entry shows a JSONPath-style path (e.g. $.user.email or $.items[2].price) so you know exactly where in the document the change occurred. This makes it easy to scan large diffs at a glance.
Keep exploring
More utilities and reading from Toolisk.