ZenovayTools

JSON Diff

Compare two JSON objects side by side. Highlights added, removed, and changed keys with a clear visual diff.

How to Use JSON Diff

  1. 1Paste the first JSON object into the left panel.
  2. 2Paste the second JSON object into the right panel.
  3. 3See added, removed, and changed keys highlighted.
  4. 4Use the summary to see the total number of differences.
Zenovay

Privacy-first analytics for your website

Understand your visitors without invasive tracking. GDPR compliant, lightweight, and powerful.

Explore Zenovay

Frequently Asked Questions

What does a JSON diff show?
A JSON diff shows the structural differences between two JSON documents: added keys (present in the second but not the first), removed keys (present in the first but not the second), and changed values (present in both but with different values). Unchanged keys are typically omitted or shown for context. A full diff can also detect array reorderings and type changes.
What is the JSON Patch format (RFC 6902)?
JSON Patch (RFC 6902) describes changes to a JSON document as a series of operations: add, remove, replace, move, copy, and test. Each operation is an object with an op type and a path (JSON Pointer). For example: {"op": "replace", "path": "/name", "value": "Alice"}. JSON Patch is used in HTTP PATCH requests and is the standard way to describe incremental JSON updates in APIs.
How does JSON comparison handle arrays?
Array comparison is tricky because two semantically equivalent arrays may differ in element order. Simple diffing compares by index — array[0] in A vs array[0] in B. This can produce misleading diffs when an element was inserted at the beginning. More sophisticated algorithms use longest-common-subsequence (LCS) to identify moved elements. This tool compares arrays by index for simplicity.
What is JSON Merge Patch (RFC 7396)?
JSON Merge Patch (RFC 7396) is a simpler alternative to JSON Patch. It represents changes as a partial JSON document: keys with values replace existing keys; keys with null values delete keys; keys absent from the patch leave the original unchanged. It is simpler to construct but less expressive — it cannot represent setting a value to null without deleting the key.
When should I use JSON diff in development?
Common use cases: comparing API responses before and after a code change, debugging configuration drift between environments, reviewing what changed in a JSON-based database record, comparing test fixtures, and verifying that a data migration produced the expected output. JSON diff is also useful for understanding what changed when a third-party API updates its response format.