JSON Diff Tool

Compare two JSON objects and highlight differences — added (green), removed (red), changed (yellow).

Paste JSON in both panels to compare

Or click to see an example

About the JSON Diff Tool

The JSON Diff Tool compares two JSON objects and highlights every difference between them. Added keys are shown in green, removed keys in red, and changed values in yellow. Unchanged keys are also listed so you get a complete picture of both documents at once.

The diff engine performs a deep recursive comparison, descending into nested objects and arrays at any level of nesting. Both side-by-side and unified view modes are available, and the full diff can be copied to your clipboard in a compact text format. All processing happens in your browser — your JSON data is never sent to a server.

How to Compare JSON Online

  1. Paste your original JSON into the left panel and your modified JSON into the right panel.
  2. The diff result updates automatically as you type — no button click needed.
  3. Use Side by Side view to see original and modified values in parallel columns, or Unified view to see all changes in a single list.
  4. Check the summary badges at the top of the diff (added / removed / changed / unchanged counts) for a quick overview.
  5. Click Copy Diff to copy the diff output as plain text with +, -, and ~ markers.
  6. Click Load Sample to try the tool with a built-in example showing several types of change at once.

Common Use Cases for JSON Comparison

  • API response auditing — Compare JSON responses from two API versions or environments to spot unintended breaking changes.
  • Configuration management — Diff package.json, tsconfig.json, or any config file before and after an update.
  • Database record comparison — Compare JSON snapshots of database rows to understand what changed between saves.
  • Feature flag auditing — Check which flags were added, removed, or changed between two flag configuration exports.
  • Debugging test failures — Paste expected vs actual JSON to instantly see which fields are mismatching.
  • Schema migration review — Compare old and new JSON schemas to identify breaking changes before deploying.
  • Webhook payload analysis — Diff two webhook payloads to understand how an event payload changed between provider versions.

Frequently Asked Questions

How deep does the JSON diff go?

The diff is fully recursive — it descends into nested objects and arrays at any depth. Each changed key is shown with its full dot-notation path (e.g. address.city) so you can locate it instantly in your original document.

What do the colour codes mean?

Green (+) means a key exists in the right JSON but not the left — it was added. Red (−) means a key exists in the left but not the right — it was removed. Yellow (~) means the key exists in both but the value changed. Uncoloured rows are identical in both documents.

Does this tool support JSON arrays?

Yes. Arrays are compared element-by-element. If the array contents differ (different length or different values at the same index), the change is reported as a modified value at the array's key path.

What happens if my JSON is invalid?

An error message appears below the affected input panel showing the exact parse error. The diff result is hidden until both inputs contain valid JSON.

Is my JSON data sent to a server?

No. The entire comparison runs in your browser using JavaScript. Your JSON never leaves your device, making this tool safe for API keys, credentials, and proprietary data structures.

What is the difference between side-by-side and unified view?

Side by Side shows four columns — change type, key path, original value, and modified value — making it easy to compare old and new values at a glance. Unified collapses everything into a single column with inline strikethrough for changed values, which is more compact for large diffs.

Can I compare JSON with different key ordering?

Yes. The diff compares keys by name, not by position. Two JSON objects with the same keys and values but different ordering are considered identical.