JSON Diff
Paste two versions of a JSON document to see what really changed. The comparison follows the data structure, so reordered keys and different indentation are not reported, while added, removed and modified values are listed with their exact paths. A JSON Patch that turns the left document into the right one is produced as well.
Compare Two JSON Documents
Where the error is
Result
Differences
JSON Patch (RFC 6902)
How to Use the JSON Diff
- Paste the original JSON on the left and the changed JSON on the right (an example is filled in).
- Tick Ignore the order of array items if arrays are unordered sets in your data.
- Press Compare.
- Read the summary and the table of differences, then copy or download the JSON Patch.
About This Tool
Developers checking API response changes, testers comparing expected and actual payloads, and anyone reviewing edits to configuration files.
Input: Two JSON documents · Output: Change list + JSON Patch.
Features and Limitations
Features
- Structural comparison: key order and whitespace never count as differences.
- Each change shows its type (added, removed, changed, type changed), JSONPath and both values.
- Generates an RFC 6902 JSON Patch with correctly ordered array operations.
- Optional order-insensitive array comparison.
Limitations
- Arrays are compared by position unless you ignore order, so inserting an item near the start reports every later item as changed.
- In order-insensitive mode the patch replaces a whole array instead of patching single items.
- Numbers are compared as JavaScript numbers, so 1 and 1.0 are equal and digits beyond about 15–17 significant figures are not distinguished.
- The table lists at most 2,000 differences.
- Results are computed in your browser; nothing you enter is sent to a server.
Example
With the sample, the tool reports 4 differences:
$.name changed, $.age removed,
$.roles[2] added and $.active added.
The reordered address keys are ignored.
Frequently Asked Questions
Does key order matter?
No. JSON objects are unordered, so {"a":1,"b":2} and {"b":2,"a":1} are reported as identical.
What is the JSON Patch output for?
It is a standard (RFC 6902) list of add, remove and replace operations. Libraries in most languages can apply it to the left document to produce the right one.
Why does inserting one array item show many changes?
By default arrays are compared position by position. Tick “Ignore the order of array items” when order is not meaningful in your data.
Is my data sent anywhere?
No. Both documents are compared in your browser.
Related Tools
More like this: all Format & Validate tools, all Developer & Web tools or the TinySandy home page.