Spot Every Difference in Your JSON
Paste two JSON documents and instantly see added, removed and changed values — down to the exact path. Two diff views, smart array matching, zero uploads.
Try the Sample button to see it in action.
Path-Level Structural Diff
Every change is reported with its exact JSON path, like $.user.roles[2]. Added, removed and changed values are separated, so nothing gets lost in reformatting noise.
Two Diff Views
Switch between a precise path-level change list and a classic line-by-line unified diff with syntax highlighting — whichever fits your review workflow better.
100% Private, 0 Uploads
Parsing and comparison run entirely in your browser. Your API responses, configs and private payloads never leave your device — safe to use with sensitive data.
What Is JSON Diff?
JSON diff is the process of comparing two JSON documents to find exactly what changed between them. When an API response shifts between environments, a config file is regenerated, or a teammate edits a data fixture, the differences often hide deep inside nested objects and arrays. A JSON diff tool walks both structures recursively and reports each difference at its source: the key that was added, the key that was removed, or the value that changed.
JSON Diff Hub performs this comparison with two complementary views. The Changes view is structural and key-order independent — it lists every difference with its full path such as $.plan.price. The Unified diff view pretty-prints both documents and marks each line with + or −, the familiar format used in git and code review.
How to Compare Two JSON Files
- Paste the original document into the JSON A pane on the left.
- Paste the modified document into the JSON B pane on the right.
- Click Compare — both inputs are validated first, with the exact line and column of any syntax error.
- Review the results: summary chips count added, removed and changed values; the Changes tab lists each path; the Unified diff tab shows line-level detail. Use Copy Diff to paste the report anywhere.
If your data contains arrays where items are inserted or removed in the middle, keep Smart array match enabled. It aligns array elements intelligently before comparing, so a single insertion does not cascade into dozens of false "changed" entries.
Structural Diff vs. Line Diff
Plain text diff tools fail on JSON: they flag every line as changed when indentation or key order shifts, even if the data is semantically identical. A structural diff parses both documents first, then compares the resulting trees — so {"a":1,"b":2} and {"b":2,"a":1} compare as equal, and whitespace differences never appear in the results. JSON Diff Hub gives you both worlds: the structural view for precision, and the unified line view when you need the familiar git-style presentation.
Frequently Asked Questions
What is a JSON diff tool?
A JSON diff tool compares two JSON documents and shows exactly what changed between them: which keys were added, which were removed, and which values changed. Instead of manually scanning two files side by side, a diff tool walks both structures and reports every difference down to the exact path, such as $.user.email.
How do I compare two JSON files online?
Paste the original document into the JSON A pane and the modified document into the JSON B pane, then click Compare. The tool validates both inputs, then shows a summary of added, removed and changed values, a path-level change list, and a line-by-line unified diff you can copy.
Is JSON Diff Hub free to use?
Yes. JSON Diff Hub is completely free with unlimited comparisons, no registration, and no usage caps. There are no premium tiers or hidden fees.
Does the tool upload my JSON data to a server?
No. All parsing, comparison and rendering happens locally in your browser. Your JSON is never uploaded, transmitted, or stored on any server, which makes the tool safe for API responses, config files and private data.
What is the difference between the Changes tab and the Unified diff tab?
The Changes tab lists structural differences by path, for example $.plan.price: 9.99 → 19.99, which is precise even when key order differs. The Unified diff tab formats both documents and shows a classic line-by-line view with + and − markers, similar to a git diff.
Can JSON Diff Hub compare JSON with keys in a different order?
Yes. The structural comparison is key-order independent, so {"a":1,"b":2} and {"b":2,"a":1} are treated as identical. Arrays can be compared strictly by position or with smart matching, which aligns elements intelligently so a single insertion does not flag every index as changed.