JSON Diff
Compare two JSON documents side by side and highlight added, removed, and changed values. Structural comparison β runs entirely in your browser, no data is sent to any server.
Frequently Asked Questions
{"a":1,"b":2} and {"b":2,"a":1} are treated as identical.add, remove, replace, move, copy, test) that transforms one JSON document into another. A JSON diff is the process of computing those differences; JSON Patch is a machine-readable way to serialise and apply them. Libraries like fast-json-patch (JS) and jsonpatch (Python) can generate and apply RFC 6902 patches programmatically.git diff or Unix diff) compares raw characters line by line. It will flag a change if you simply reformat or reorder keys, even when the data is logically identical. A structural diff parses both sides first, then compares the in-memory data trees β so reformatting, reindenting, or reordering object keys produces zero differences. For JSON, structural diffing is almost always more useful because it reflects actual data changes rather than cosmetic edits.About This JSON Diff Tool
This free JSON diff tool compares two JSON documents and highlights exactly what changed between them. Unlike a plain text diff, it parses both sides into their underlying data structures first, so differences in formatting, indentation, and key order are ignored β only real changes to keys and values are reported.
Comparing JSON is a routine task when reviewing API responses across versions, validating configuration changes, debugging data syncs, or auditing what an edit actually modified. A side-by-side structural diff makes those changes obvious at a glance.
When to use this tool
- Spotting what changed between two API responses
- Reviewing config file edits before deploying
- Auditing the result of a data migration or transform
- Comparing expected vs. actual output in tests
How JSON Diffing Works
Three steps run every time you click Compare:
Parse
Each side is parsed with JSON.parse(). If either fails, a clear error tells you which input is invalid and why.
Walk
Both structures are walked recursively. Objects are matched by key (order-independent); arrays are matched by index. Each node is classified as unchanged, added, removed, or changed.
Render
The result is laid out as aligned side-by-side rows with red, green, and amber highlights, plus a summary count of each change type.
Common Use Cases
API Version Comparison
Compare the same endpoint's response across two API versions to see which fields were added, removed, or renamed before upgrading a client.
Config Change Review
Diff before and after versions of a JSON config to confirm an edit changed only what you intended.
Test Assertions
Compare expected vs. actual JSON when a test fails, to pinpoint the exact field causing the mismatch.
Data Migration Audits
Verify that a transform or migration preserved the right data by diffing a sample record before and after.