Switch tool

JSON Diff

Structurally compare two JSON documents ignoring key order; lists added, removed and changed entries with old→new values, with optional array-order-insensitive matching.

Left / Original
0 chars · 1 lines
Right / Target
0 chars · 1 lines

Enter valid JSON on both sides to compare.

How to use

Purpose

JSON diff viewer that visualizes differences between two JSONs by field path: added (green), removed (red), modified (yellow). Handles deep nesting and arrays with two matching strategies (by index or by key). Common for API version regression, config drift detection, CI output comparison, data migration verification, and prod-vs-test diff. All comparison runs locally; sensitive data never leaves the browser.

Steps

  1. Paste or drop two JSONs side by side (version A and B)
  2. Click Diff for a recursive field-by-field comparison
  3. Results show a difference tree: green added, red removed, yellow modified
  4. Click a diff node to jump to the source JSON location
  5. Array matching strategy: by index (positional) or by key (specify a stable field like id)
  6. Filters: show only changes / only additions / only removals
  7. Export diff report as JSON or a readable summary
  8. Toggle "collapse identical nodes" to focus on differences only

FAQ

Two arrays with the same elements but different order are reported as different?
Index-mode treats them as different. Switch to "by key" mode and select a stable field (id), and the tool sorts both arrays before diffing.
Floating-point 0.1 + 0.2 results in 0.3 vs 0.30000000000000004 — diff?
Strict mode reports it. Enable "numeric tolerance" with a threshold (e.g. 1e-9) — differences below the threshold are treated as equal. Helps with IEEE 754 noise.
Can I ignore sub-second differences in timestamps?
Per-field rules: specify a path (user.createdAt) and a comparator (ignore, string-equal, date-equal). Date-equal treats "2026-01-01T00:00:00Z" and "2026-01-01T00:00:00.000Z" as equal.
Can it handle huge files (tens of MB)?
Yes — parsing runs in a Worker. Tens of MB are fine on 4GB+ machines. For >100MB, consider sampling key fields first to avoid UI lag.
Can I diff JSON Schemas themselves?
Yes. Schemas are JSON. Schema diffs are especially useful when an API upgrade may have broken backward compatibility (required fields, enums, types).

Use cases

  • API version regression: compare responses before/after upgrade to spot accidentally removed fields
  • Config drift detection: diff prod vs test configs to find divergent settings
  • Data migration verification: export old vs new DB data and diff for completeness
  • CI output comparison: automated test JSON output diffed against a baseline for regression
  • Prod vs test: when the same endpoint returns different data, diff isolates data vs logic differences

Use cases

API upgrade regression, config drift, data migration verification, CI baseline diff, multi-env data comparison. Backend, QA, DevOps. Recursive comparison, array-key matching, numeric tolerance, and field-level filters are the differentiators.