JSON Diff: Compare Two JSON Files
Compare two JSON files by structure, not by line. See every changed, added and removed value with its old and new version side by side, even in files too large for a text diff. Nothing is uploaded.
- Nothing is uploaded
- Free, no sign-up
- Large and compressed files
Here you will see the semantic difference between your datasets.
Use the filtering options above to easily understand and compare your data.
The demo compares an orders API response before and after a deploy. Open your own two files with the buttons above, or drop each onto its side. For more room, open the full app, which opens with the files you opened here.
How to Compare Two JSON Files
- Open the original with Open the First JSON File and the new version with Open the Second JSON File. Compressed
.json.gzand.json.zstfiles work as they are. - The diff on the right lists only what differs, with each changed property highlighted in both files.
- Too many changes to read? Type a property in Filters, e.g.
status, to see only how that one changed.
A Structural Diff, Not a Text Diff
Line-based diff tools report a change wherever the text differs: a reordered key, a re-indented file or 134.0 written as 134 shows up as noise, and a change deep in a nested array is a wall of red and green. Slicelytics parses both files and compares the values. Key order and formatting don't count, numbers are compared as numbers, and each difference is reported at its path, e.g. that [2].cancel_reason was removed and [2].cancellation.reason added.
Items of a list are compared by position: the first with the first, the second with the second. When the two files list the same records in a different order, sort them the same way first.
Where a JSON Diff Helps
- API regressions: the same endpoint's response from staging and production, or before and after a deploy.
- Config drift: two environments' configuration exports.
- Snapshot tests: a failing snapshot against the stored one, when the test runner's diff is too long to read.
- Model and pipeline outputs: results of two versions on the same input. See comparing benchmark and eval runs.
Compare Production Data Safely
Many online JSON diff tools send both files to their server. Production responses contain customer data, and pasting them into such a tool can breach GDPR or your company's policies. Here, both files are parsed and compared in your browser and never uploaded. To share the result with a colleague, Share puts both files and the view in one link, with the data after the #, which browsers never send to a server.
Common Questions
Does the JSON diff ignore key order?
Yes. Objects are compared by their keys, so {"a":1,"b":2} and {"b":2,"a":1} are the same. Arrays are compared by position, as their order usually means something.
How large can the JSON files be?
There is no upload limit, as nothing is uploaded. JSON arrays are streamed in a batch at a time: the diff covers the items loaded so far, and Load more brings in the next batch of both files.
Can I compare JSON with NDJSON or CSV?
Yes. Both files are read as data before they are compared, so their formats needn’t match. See Compare JSON and CSV.
Are my JSON files uploaded to compare them?
No. Both files are parsed and compared in your browser, and never sent to a server.
More Free Tools
- JSON ViewerView, format and filter large JSON files
- NDJSON / JSONL DiffCompare two logs or result files line by line
- CSV DiffCompare two CSV files cell by cell
- Compare JSON and CSVDiff files in different formats
- ZST & GZ ViewerOpen .zst and .gz data without unpacking it
- NDJSON / JSONL ViewerOpen multi-gigabyte logs line by line