DevToolKit

JSON Diff — Compare Two JSON Objects & Highlight Differences [2026]

Free JSON diff tool. Paste two JSON objects and instantly see additions, deletions, and changes highlighted. Deep comparison of nested objects and arrays. 100% browser-based.

What is JSON Diff?

JSON Diff is a free online tool that compares two JSON objects and highlights the differences between them. It performs a deep, recursive comparison of nested objects and arrays, showing exactly which keys were added, removed, or changed. This is essential for debugging API responses, comparing configuration files, and reviewing data changes.

How to Use JSON Diff

1. Paste your first JSON object into the left input area. 2. Paste your second JSON object into the right input area. 3. Click "Compare" to see the differences highlighted below. Additions are shown in green, deletions in red, and changes in yellow. 4. Expand or collapse nested differences for easier navigation. 5. Use "Swap" to switch the two inputs.

How JSON Diff Works

The tool parses both JSON inputs and recursively traverses both object trees simultaneously. For each key, it checks whether the key exists in both objects and whether the values match. Nested objects are compared recursively. Arrays are compared element by element. The result is a structured diff tree that categorizes each difference as added, removed, or changed, along with the old and new values.

Common Use Cases

  • Comparing API responses before and after a code change
  • Debugging differences between expected and actual JSON payloads
  • Reviewing configuration file changes across environments
  • Validating data migration by comparing source and target JSON
  • Spotting unintended changes in JSON-based feature flags

Frequently Asked Questions

What types of differences does this tool detect?

The tool detects three types of differences: additions (keys present in the second JSON but not the first), deletions (keys present in the first JSON but not the second), and changes (keys present in both but with different values). It handles nested objects and arrays recursively.

Can it compare large JSON files?

Yes. The tool handles JSON files up to several megabytes. Very large files may take a moment to process since everything runs in your browser. For best performance, keep files under 5MB.

How are arrays compared?

Arrays are compared element by element based on their index position. If one array is longer than the other, extra elements are shown as additions or deletions.

Is my data sent to a server?

No. All comparison happens entirely in your browser using JavaScript. Your JSON data never leaves your machine.

Related Tools