JSON Diff
See exactly which values changed between two JSON documents.
How to use the JSON Diff
- Paste or open the original JSON on the left and the changed JSON on the right.
- Every addition, removal and change is listed with its path and the old and new values.
- For arrays of records, choose "Match items by a key" so reordered items are paired by ID.
- Copy the report, or download a JSON Patch that turns the original into the changed version.
About this tool
A line-by-line text diff is a poor fit for JSON. Reordering keys, changing indentation or minifying a file produces a wall of red and green even when the data is identical, while a real change can hide among the noise. This tool parses both documents and compares the data itself, so key order and formatting never matter and each difference is reported once, at its exact location.
Each change comes with a path such as $.owners[id=9].name, so you can find it straight away in large configuration files or API responses. Arrays can be compared position by position, by a key field so that a list of users reordered between two responses still lines up by ID, or as unordered sets for lists of tags. Text can be compared without regard to case, and numbers within a small tolerance, which is useful for floating-point output.
The JSON Patch download follows the RFC 6902 standard, a list of add, remove and replace operations that many libraries can apply. It is the compact way to record or send a change instead of a whole new document.
Frequently asked questions
Does key order or formatting matter?
No. Both documents are parsed first, so {"a":1,"b":2} and a reformatted {"b": 2, "a": 1} are identical. Only differences in the data are reported.
When should I match array items by a key?
When an array holds records with an ID, such as users or products, and the order may change. Matching by the key pairs each record with its counterpart, so you see real edits instead of every item appearing changed.
What is a JSON Patch?
A standard format for describing changes to a JSON document as operations like add, remove and replace. Apply it to the original with any JSON Patch library to get the changed version.
Can it handle large files?
Files of several megabytes compare quickly. The list on screen shows the first 2,000 differences; the copied report and the patch include them all.
Is my JSON uploaded to compare it?
No. Both documents are parsed and compared in this browser tab, and are only remembered locally so they are still there when you return.