JSON Diff

Compare two JSON documents and see exactly what changed — added, removed and changed values reported by JSON path. Runs in your browser; nothing is uploaded.

Diff report (JSON)

About this tool

JSON Diff compares two JSON documents and reports exactly what differs between them — no more eyeballing two blobs side by side.

Paste your first (left / old) document and your second (right / new) document, and the tool walks both structures recursively:

The output is a JSON report:

{
  "equal": false,
  "added": 1,
  "removed": 0,
  "changed": 1,
  "changes": [
    { "path": "$.age", "kind": "changed", "old": 30, "new": 31 },
    { "path": "$.city", "kind": "added", "new": "NYC" }
  ]
}

Set Indent for the output (or 0 to minify). Everything runs locally in your browser via WebAssembly — your data is never uploaded.

Handy for

FAQ

Does the order of object keys matter?

No. {"a":1,"b":2} and {"b":2,"a":1} compare as equal — objects are matched key by key, not by position. Only the report follows the left document's key order (removed/changed first, then added keys).

How are arrays compared if an item was inserted in the middle?

Arrays are compared strictly index by index, so inserting one element near the front shifts everything after it and each shifted index is reported as "changed", plus one "added" at the end. It's a positional diff, not a move-detecting diff.

What does a type change (e.g. string to number) look like?

It's reported as a single "changed" entry at that path with the old and new values — e.g. "1"1. The value's type is part of the comparison, so a string "1" never equals the number 1.

Why do I get "the first (left) JSON is invalid"?

Both inputs must be well-formed JSON documents; the error tells you which side failed and where. Common culprits: trailing commas, single quotes, or unquoted keys — those are JavaScript-isms, not JSON.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool json-diff '{"name": "alice", "age": 30}' 'right={"name": "alice", "age": 31, "city": "NYC"}'

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/json-diff/?left=%7B%22name%22%3A%20%22alice%22%2C%20%22age%22%3A%2030%7D&right=%7B%22name%22%3A%20%22alice%22%2C%20%22age%22%3A%2031%2C%20%22city%22%3A%20%22NYC%22%7D&indent=2

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.