JSON Diff
What actually changed between two JSON documents — by value and path, not by line.
Runs entirely in your browser
Loading tool...
How to use
- Paste the before and after documents — an API response before and after a deploy, two config files, two fixtures.
- Read the paths: each row names the exact place that changed.
- Look for type changes first; they break clients more often than value changes.
- Reformatting and key reordering will not show up, which is the point.
Features
- Compares values at paths, so key order and formatting are correctly ignored.
- Paths written the way code addresses them: `user.roles[0]`.
- Type changes reported separately from value changes.
- Arrays compared by index — boring, and always true.
- Runs entirely in your browser; neither document is uploaded.
Frequently asked questions
- Why not a text diff of the formatted JSON?
- Because a text diff answers a different question. Reorder two keys and it reports two changes where the document means the same thing; reformat a file and it reports a rewrite. Comparing values at paths reports only what a consumer of the JSON would actually notice.
- Why are arrays compared by index rather than matched up?
- Because matching by content is a guess. Insert an element at the front and a clever matcher either recognises the shift or reports every element as changed — and when it guesses wrong, the diff is worse than useless. By index the answer is dull and always correct; if you need order-insensitive comparison, sort both sides first.
- What counts as a type change?
- A value whose JSON type differs: `1` to `"1"`, an object to an array, anything to null. It is separated out because it is the change most likely to break a client — a string where a number was expected fails at the point of use, often far from where it was introduced.
Related tools
Format and beautify JSON instantly.
Compare two blocks of text and see exactly which lines were added, removed or changed.
Interfaces inferred from a real response — with the fields that only some records have marked optional.