JSON Diff — Compare JSON Data Online

Compare two JSON objects side by side and instantly see the differences. Deep recursive diff with added, removed, and changed values highlighted.

Left JSON (A)0 chars
1
Right JSON (B)0 chars
1
Diff Output
Left JSON input is empty. Paste JSON on both sides and click Compare.
🛡️Zero server logs. Comparison runs 100% inside your browser. Your data never leaves this tab.

JSON Diff — Compare JSON Data Online

JSON Diff is a 100% client-side tool for comparing two JSON objects side by side. It performs a deep recursive comparison and highlights added, removed, and changed values, making it easy to spot differences in API responses, configuration files, or any JSON data.

🔒 Client-side only⚡ Web Worker processing🌐 Works offline🛡️ Zero server logs

How to Compare JSON Online

  1. Paste the first JSON into the left textarea and the second JSON into the right textarea.
  2. Click the Compare button to instantly see all differences highlighted in the output.
  3. Use the Swap button to flip the comparison direction, or Copy Diff to share the results.

Frequently Asked Questions

Questions about JSON Diff? We've got answers.

How does the JSON comparison work?

The tool performs a deep recursive comparison of both JSON structures. It walks through every key and index, comparing values at all nesting levels. Added keys, removed keys, and changed values are all detected and highlighted.

Can it compare large JSON files?

Yes. Since the comparison runs entirely in your browser, performance depends on your device. Files up to several megabytes work well. The algorithm uses iterative traversal to handle deeply nested structures without stack overflow.

Is my JSON data sent to any server?

No. All comparison logic runs 100% in your browser. Your data never leaves your device.

What does the Swap button do?

Swap exchanges the left and right JSON inputs. This reverses the diff direction — additions become removals and vice versa, which is useful for seeing the changes from the opposite perspective.


Automated E2E Test Suite Logs

Our build systems validate edge-case processing under extreme conditions before each deployment.

Stability
100.0%
Passed
41/41
Env
V8-Sandbox
Engine: Vitest RunnerUpdated: 2026/6/10 02:04:12
PASScomputeDiff should detect a scalar value change
PASScomputeDiff should return empty diff for identical objects
PASScomputeDiff should detect added keys
PASScomputeDiff should detect removed keys
PASScomputeDiff should recurse into nested objects
PASScomputeDiff should detect array value changes
PASScomputeDiff should detect added array elements
PASScomputeDiff should detect removed array elements
PASScomputeDiff should detect type changes
PASScomputeDiff should handle null values
PASScomputeDiff should detect null vs object changes
PASScomputeDiff should handle empty objects
PASScomputeDiff should compare root scalar values
PASScomputeDiff should detect boolean changes
PASScomputeDiff should handle numeric zero correctly
PASScomputeDiff should not mutate input objects (immutability)
PASSformatDiffLines should show info line when no entries
PASSformatDiffLines should format added entries with + prefix
PASSformatDiffLines should format removed entries with - prefix
PASSformatDiffLines should format changed entries as - then + pair
PASSformatValue should format null
PASSformatValue should format undefined
PASSformatValue should format string
PASSformatValue should format number
PASSformatValue should format boolean
PASSformatValue should format empty array
PASSformatValue should format non-empty array
PASSformatValue should format empty object
PASSformatValue should format non-empty object
PASScountStats should count added entries
PASScountStats should count all types
PASScountStats should return zero for empty input
PASSisValidJson should accept valid JSON
PASSisValidJson should reject invalid JSON
PASStryParse should parse valid JSON
PASStryParse should return null for invalid JSON
PASStryParse should return null for empty input
PASScomputeDiffLines should find line for changed key on left side
PASScomputeDiffLines should highlight correct line when key is substring of another key
PASScomputeDiffLines should not highlight added entries on left side
PASScomputeDiffLines should not highlight removed entries on right side
⏱️ 0.18ms📦 1.5KB🎚️ Max Nesting: 3🌿 AST Nodes: 48🛡️ V8 Heap: Healthy
$ codecaven-validator --scope=tool● CLUSTER COMPLIANT

Tool Changelog & Updates

1.0.02026-06-09
  • Feature: Initial release of JSON Diff tool
  • Feature: Deep recursive comparison of JSON objects and arrays
  • UX: Responsive dual-pane layout (side-by-side on desktop, stacked on mobile)
  • Feature: Added, removed, and changed value detection with color highlighting
  • UX: Swap button to reverse comparison direction
  • UX: Copy Diff and Clear All actions
  • UX: Full i18n support (English, German)