Free Online JSON Diff: Compare Two JSON Documents Semantically
Paste two JSON documents and see exactly which keys were added, removed, or changed — with the full dot-path to each modification. Ignores whitespace and key order because it compares VALUES, not text. 100% client-side; safe for API payloads and config files.
Added
2
Removed
1
Changed
3
Unchanged
5
- ~ changedemailBefore:
"[email protected]"After:"[email protected]" - ~ changedroleBefore:
"admin"After:"owner" - + addedtags[2]Value:
"veteran" - ~ changedsettings.themeBefore:
"dark"After:"system" - − removedsettings.languageWas:
"en" - + addedsettings.timezoneValue:
"UTC"
Semantic Comparison
Compares JSON VALUES at every depth — ignores key order, whitespace, and minification. {a:1,b:2} equals {b:2,a:1} (which a text diff would mis-flag as different).
Path-Indexed Changes
Each change record carries its full path: user.settings.theme, items[3].price. Spot exactly which leaf changed without scanning the whole document.
Added / Removed / Changed
Three change categories with color coding. Removed keys show their old value, added keys show their new value, changed keys show both side-by-side.
100% Client-Side
JSON payloads often contain auth tokens, customer IDs, or internal data. The diff runs entirely in your browser — never uploaded anywhere.
See What Changed — By Key, Not By Line
Comparing two JSON documents with a regular text diff produces a mess: line numbers shift with whitespace, key reordering shows as additions-plus-removals, pretty-printing vs minification flags every line as different. None of that is what you want when debugging an API response. Our Free JSON Diff Tool parses both documents and walks the value trees in lockstep, emitting one change record per real difference — with the full path (user.settings.theme, items[2].price) showing exactly where it lives. Same keys in different order? Identical. Same values pretty vs minified? Identical. The diff tells you only what is genuinely different.
Pair this with our JSON Formatter (validate and beautify before comparing), Diff Checker (sibling text-diff tool for prose and code), JSON Schema Generator (infer a schema from a sample to validate future payloads), and the URL Parser (compare the URLs that produced these responses).
Six Real-World Uses for JSON Diff
| Context | Why JSON Diff Helps |
|---|---|
| API response debugging | Compare two API responses across versions or environments to see exactly which fields changed. |
| Config drift detection | Diff staging-vs-production config files (or two regions) to spot the unintended differences before deploy. |
| Snapshot test review | When a Jest snapshot test fails, paste old vs new JSON to see precisely what shifted. |
| Schema migration validation | After running a migration, diff a sample document before and after to verify only the intended fields changed. |
| GraphQL response comparison | Compare two GraphQL responses with different query selections to validate field-level data. |
| Webhook payload investigation | Diff two webhook payloads (e.g. before/after a status change) to identify the trigger field. |
Text Diff vs JSON Diff — Pick the Right Tool
| Aspect | Text Diff (Diff Checker) | JSON Diff (this tool) |
|---|---|---|
| Comparison unit | Lines (or characters within lines) | Keys, values, array indices at any depth |
| Whitespace impact | Different whitespace = different lines = noise | Ignored entirely — pretty vs minified compare equal |
| Key order | {a:1,b:2} differs from {b:2,a:1} | Same — semantic equality |
| Path readability | Just a line number | user.settings.theme (clear data-model path) |
| Output format | Two side-by-side text panes or unified ± | Path-indexed list of change records |
| Best for | Prose, code, plain text, logs | Structured data, API payloads, configs |
Four JSON Diff Gotchas Worth Knowing
1. Arrays Compared by Index
Inserting an element at position 0 shifts every subsequent index, showing the entire array as "changed". For move-aware comparison, normalize array order first (sort by ID) or use a streaming LCS-based differ.
2. Strict Type Comparison
1 ≠ "1", true ≠ 1, null ≠ undefined. This is correct API-debugging behavior — if a type changed, you want to know.
3. Floating-Point Equality
0.1 + 0.2 ≠ 0.3 because of IEEE 754 representation. If your data has computed floats, two semantically-identical results may diff. Round to fixed precision before comparing if needed.
4. Date Strings Are Strings
"2026-05-11T14:00:00Z" vs "2026-05-11T14:00:00.000Z" are different strings even though they represent the same instant. Normalize date format before diffing.