Developer

JSON Diff — Compare Two JSON Objects Online Free 2026

JSON Diff compares two JSON documents and highlights exactly what changed: added keys (+added), removed keys (−removed), and modified values (~changed). The comparison is structure-aware — key order differences and whitespace changes are ignored. See changes at any nesting depth with full JSONPath locations.

Differences

How It Works

  1. Paste JSON A (original) in the left panel
  2. Paste JSON B (updated) in the right panel
  3. Click Compare to see added, removed, and changed keys
  4. Each difference shows its full JSONPath location

JSON Diff — Structure-Aware JSON Comparison

This JSON diff tool performs a structural comparison — it parses both JSON documents and compares the underlying data, not the text representation. This means that reformatting (changing indentation), reordering keys in an object, or changing from minified to formatted JSON does not show as a difference. Only actual data changes are reported: keys that exist in B but not A (added), keys in A but not B (removed), and keys present in both but with different values (changed). Each difference is reported with its full JSONPath path, so you can immediately understand where in a deeply nested structure the change occurred. To investigate the structure of either document further, use the JSONPath Finder to navigate it interactively.

When JSON Diff Is Useful

API versioning: compare the response from API v1 and API v2 to understand exactly which fields changed, were added, or removed — without reading the entire response. Configuration management: compare development, staging, and production config files to ensure differences are intentional. Test fixture updates: when an API response changes, compare the old fixture to the new one to confirm only expected fields changed. Data pipeline validation: compare the JSON output of two pipeline versions to verify the transformation logic produces identical results for the same input. Feature flags: compare the feature flag JSON before and after a release to document which flags were toggled.

Array Comparison — Index-Based

This tool compares arrays by element index: element[0] in A is compared to element[0] in B, element[1] to element[1], etc. If arrays have different lengths, excess elements are reported as additions or removals. This is a straightforward, predictable comparison — if you reorder array elements, all of them may show as changed even if the data is equivalent. A more sophisticated LCS-based comparison is out of scope for this tool. For very large arrays, if you want to check whether a specific value exists at all, use the JSONPath query tester in the JSONPath Finder with a filter expression like $.items[?(@.id == 42)].

Key Order Does Not Matter

JSON objects are unordered by specification — the sequence in which keys appear in the text is not significant. This tool correctly ignores key ordering when comparing objects. Both {"a":1,"b":2} and {"b":2,"a":1} are considered identical. This is in contrast to a text diff, which would mark every line as changed due to the reordering. If you need to normalize key order before comparing, use the JSON Schema Generator or our JSON Formatter with sort-keys enabled.

Frequently Asked Questions

JSON diff compares two JSON documents and shows exactly what changed: which keys were added, removed, or modified. It performs a deep recursive comparison so changes nested inside objects or arrays are found at any depth.

Array elements are compared by index position — element 0 in A is compared to element 0 in B, and so on. This is a simple index-based comparison; reordering array elements will show as changes.

Yes. The comparison is fully recursive and traverses nested objects and arrays at any depth. Each changed value is reported with its full JSONPath so you can see exactly where in the document the change occurred.

A text diff compares line by line, so formatting differences (indentation, key order) show up as changes even if the data is equivalent. JSON diff compares the parsed data structure, so reformatting or reordering object keys does not show as a difference.

Comments