A semantic diff of two JSON values
This page uses the same comparison as JSON Diff, with a file control and a drop target on each side. Each file is read with FileReader, capped at 10 MB, and parsed with JSON.parse. The walk compares objects by key and arrays by index. Added paths are green, removed paths are red, and modified paths are yellow.
Two files, one report
Load the original on the left and the modified JSON on the right, then Compare. Download diff report saves the visible rows as json-diff-report.txt from this browser. The file is not uploaded, and the report is not sent anywhere.
Key order and arrays
Ignore key order starts checked, so {"a":1,"b":2} and {"b":2,"a":1} match. Array order still matters: index 0 is compared with index 0. Uncheck the box when the order of object keys itself should be reported. A very large document stops after 400 reported changes. Sort both files first with Sort JSON keys when you want the text order normalized before you compare.
Frequently Asked Questions
Are the two JSON files uploaded?
No. Each .json file is read in this browser with FileReader. The comparison and the downloaded report stay on this device.
How do I load two JSON files?
Use Upload original .json and Upload modified .json, or drop a .json file onto each box. You can also paste JSON. Files larger than 10 MB are refused locally.
What is in the downloaded diff report?
A text file named json-diff-report.txt with one line per visible row: added, removed, and modified paths. It is created in this browser after you compare.
Does key order count as a difference?
Not while Ignore key order is checked. Two objects with the same keys and values match. Uncheck it to report a key-order change. Array order always counts.
How are arrays compared?
Arrays are compared by index. A longer array reports added items, a shorter array reports removed items, and the same index with a different value is modified.