JSON Compare

See exactly what changed between two JSON documents — by path, not by line.

A line-by-line diff of two JSON files drowns in noise: reformatting, a different key order or one extra indent turns every line red. This tool compares the data itself. Objects are matched by key, so the order of keys does not matter, and the result is a short list of real changes: what was added, what was removed and which values changed, each with its path such as $.orders[0].total.

Arrays are compared by position by default. When an array holds records with an id, type id into Match array items by key: records are then paired by id, so a reordered list is not reported as a change and only real edits remain. Numbers are compared by value, and long integers are compared digit for digit.

Filter the list by type and download the result: a readable report with the before and after values, or a JSON Patch (RFC 6902) — the list of add, remove and replace operations that turns the first document into the second, ready for an API or a test.

Nothing is uploaded: everything runs inside your browser, so API responses, configs, contact lists and datasets stay on your device.

What the comparison shows

How to compare two JSON files in 3 steps

  1. 1

    Load both versions

    Paste each JSON or open files on the left and right; the Sample shows two versions of an order export.

  2. 2

    Compare

    Optionally enter a key such as id to pair array items, then press Compare.

  3. 3

    Review and export

    Filter added, removed and changed values, then download the report or JSON Patch.

Frequently asked questions

Put one JSON on the left and the other on the right, press Compare and read the list of differences.
No. Objects are compared by key, so {"a":1,"b":2} and {"b":2,"a":1} are equal.
A standard list of operations (add, remove, replace) that turns one document into another. It is available when arrays are compared by position.
Items were probably reordered. Enter the key that identifies records, such as id, and they will be matched correctly.

Related tools