What is JSON Diff?
JSON Diff — A JSON Diff Tool is a free tool that compares two JSON objects side by side and highlights additions, deletions, and modifications between them.
Loading your tools...
Compare two JSON objects side by side with color-coded difference highlighting. Additions in green, deletions in red, modifications in yellow. Handles nested objects and arrays at any depth.
JSON Diff: Paste two JSON objects into the left and right panels. The tool instantly highlights differences — additions in green, deletions in red, and modifications in yellow. Copy the diff report or use it for debugging.
Loading Tool...
JSON Diff — A JSON Diff Tool is a free tool that compares two JSON objects side by side and highlights additions, deletions, and modifications between them.
Paste the original JSON into the left panel.
Paste the updated JSON into the right panel.
Run comparison and inspect highlighted differences.
Use results to update code, tests, or documentation.
API response regression checks
Config changes between environments
Fixture and snapshot updates
Release review for payload modifications
A plain text diff (like Git's default diff) compares JSON files line-by-line — which produces tons of false-positive "changes" just from different key ordering or formatting. This tool does semantic diff: it parses both JSON objects, walks their structures by key path, and reports actual additions, deletions, and value changes — not formatting noise. So {"a":1,"b":2} and {"b":2,"a":1} are correctly identified as identical.
data.user.email: "old@x.com" → "new@x.com" — easy to grep / paste into a bug report[{"op":"replace","path":"/user/email","value":"new@x.com"}] — apply with any JSON Patch library{"a":null} ≠ {} — they're semantically different. The diff reports the distinction."1" (string) vs 1 (number) is reported as a value+type change, not just value.1 = 1.0 = 1e0 are normalized to the same canonical numeric form before compare."hello" ≠ "hello "All JSON parsing, normalization, and diffing happens entirely in your browser using JavaScript. Your JSON payloads — including any tokens, PII, or sensitive data they may contain — never leave your device. No analytics, no logging, no server calls. Verify in DevTools → Network: paste a payload, click diff, and confirm zero outgoing requests.
JSON Patch is a standardized format for describing JSON changes. Each operation has an op, path, and operation-specific fields:
| Operation | Purpose | Example |
|---|---|---|
add | Insert a new value | {"op":"add","path":"/foo","value":1} |
remove | Delete a value | {"op":"remove","path":"/foo"} |
replace | Change an existing value | {"op":"replace","path":"/foo","value":2} |
move | Move value to new path | {"op":"move","from":"/a","path":"/b"} |
copy | Duplicate value to new path | {"op":"copy","from":"/a","path":"/b"} |
test | Assert value (for atomic patches) | {"op":"test","path":"/foo","value":1} |
Path uses JSON Pointer (RFC 6901) syntax: /key for object, /arr/0 for array index, /users/3/name for nested. Use ~0 to escape ~ and ~1 to escape / in keys.
| Tool | Strengths | When to use |
|---|---|---|
| This tool (browser) | Visual side-by-side, no install, private | Ad-hoc comparison, debugging, no environment |
jq --argjson | Scriptable, Unix-friendly, supports complex queries | CLI pipelines, automation, CI checks |
json-diff npm | Node.js library, returns structured patches | Programmatic diffing in apps |
Python deepdiff | Most feature-rich, tolerates fuzzy matching | Python data science / test assertions |
diff -u file1.json file2.json | Universally available | Quick textual check; falls down on key reorder |
JSON diff is most useful for API regression testing. Common pattern:
For automated regression testing, export the diff as JSON Patch and assert in your test suite: expect(diff(baseline, current)).toEqual(expectedPatch).
timestamp or requestId fields that change per request, you'll see them as "changed" on every diff. Strip them before comparing, or use the "ignore paths" option (if available).0.1 + 0.2 = 0.30000000000000004. Round floats before comparing if your data has math.[1,2,3] and [3,2,1] show 3 changes. Use "match by key" for arrays of objects with stable IDs.Paste JSON in both fields to compare. Differences update automatically.