JSON Diff

See exactly what changed between two JSON documents, path by path, ignore key order or array order when you want, and get a JSON Patch that turns one into the other.

Funziona nel tuo browser. I tuoi file non lasciano mai il dispositivo. Scopri come verificarlo

…

Come si usa

  1. 1
    Paste the original

    Put the first JSON on the left.

  2. 2
    Paste the changed one

    Put the second JSON on the right.

  3. 3
    Choose array matching

    In order, unordered or by key.

  4. 4
    Set a tolerance

    Optional, for floating-point values.

  5. 5
    Read the differences

    Check paths and values.

  6. 6
    Copy the patch

    Download the RFC 6902 JSON Patch.

Informazioni su questo strumento

Comparing JSON as text is misleading: reordered keys, different indentation and line wrapping show up as changes, while a real change buried in a long line is easy to miss. This tool compares the structure instead. It parses both documents and walks them together, listing every value that was added, removed or changed, with its full path such as $.dependencies.react, the value before and the value after. Object key order never counts as a difference. Arrays can be compared item by item, as unordered sets, or by matching items on a key field such as id, which is what you want for lists of records that were re-sorted. A tolerance lets you ignore tiny floating-point differences. The result also includes an RFC 6902 JSON Patch, and for ordered comparisons the tool proves the patch is correct by applying it to the original and checking it produces the second document exactly.

When to use which array mode

- Item by item: for arrays where position matters, such as steps, coordinates or ordered lists. - Ignore order: for arrays that are really sets, such as tags or roles. Only values present on one side are reported. - Match by key: for lists of records with an id. Items are paired by the key field, so a re-sorted list shows only the real field changes.

Reading the output

Each row gives the kind of change, the path in JSONPath notation, and the old and new values (long values are shortened in the table; the patch has them in full). The counts at the top give a quick summary: how much was added, removed and changed.

The JSON Patch

JSON Patch (RFC 6902) is a standard list of operations (add, remove, replace) addressed with JSON Pointers like /dependencies/react. Many APIs accept it with the PATCH method and the application/json-patch+json content type, and libraries exist for every language. With ordered comparison, applying the patch to the first document reproduces the second exactly, which the tool checks for you.

Typical uses

- Checking what an API response change actually changed between versions. - Reviewing configuration drift between staging and production. - Comparing package.json or composer.json before and after an upgrade. - Writing test assertions from a known diff.

Limits

Both inputs must be valid JSON; fix broken input with the JSON Repair tool first. Very large documents (tens of megabytes) are slow in a browser tab. Numbers are compared as JavaScript numbers, so integers beyond 2 to the power 53 lose precision; compare such IDs as strings. This is a developer aid, not an audited data reconciliation.

Esempio svolto

Comparing two versions of a package.json shows version changed from 1.2.0 to 1.3.0, react changed from 18.3.1 to 19.0.0, zod removed, next added and the first item's qty changed from 2 to 3: three changes, one addition and one removal, with a five-operation JSON Patch.

In breve

Domande frequenti

Does key order matter?

No. Objects are compared by key, so reordered keys are not differences.

Can it ignore array order?

Yes. Choose ignore order, or match items by a key field such as id.

What is a JSON Patch?

A standard list of add, remove and replace operations (RFC 6902) that turns one document into another.

Can I compare floating-point numbers loosely?

Yes. Set a tolerance and smaller differences are ignored.

Is my data uploaded?

No. The comparison runs in your browser.

What if one input is invalid?

You get the line of the error; use JSON Repair to fix it.

Completamente gratisNessun costo, nessuna registrazione
I file restano privatiTutto funziona nel tuo browser
Facile nella tua linguaDisponibile in molte lingue