JSON Diff

Compare two JSON documents and see every added, removed and changed value with its path. Key order is ignored.

Runs in your browser. Nothing is uploaded.

How to use the JSON Diff

  1. Paste the original JSON on the left and the changed JSON on the right, or press Load example.
  2. The comparison runs as you type. The summary counts added, removed and changed values.
  3. The Changes tab lists every difference with its JSONPath and the old and new values.
  4. The Line diff tab shows both documents side by side as a line-by-line diff, after sorting keys.
  5. Tick Ignore order of array items if lists may be in a different order, then copy the change list to share it.

Why a normal text diff isn’t enough

Comparing two JSON files with a regular diff tool often shows changes on almost every line, even when the data is nearly identical. That’s because JSON can be written in many equivalent ways: keys in a different order, different indentation, everything on one line. A text diff can’t tell these cosmetic differences from real ones.

This tool understands JSON. It parses both documents and compares the actual values, so it reports only genuine differences in the data.

What you get

  • A precise change list. Every added, removed and changed value, with its JSONPath (for example $.dependencies['date-fns']) and its old and new values side by side.
  • Type changes highlighted. If a number turned into a string, or null replaced an object, it’s flagged separately. Type changes often break code that expects a particular type.
  • A clean line diff. Both documents are re-formatted identically with sorted keys, then compared line by line, so you can see each change in context. Long unchanged stretches are folded away.
  • A copyable report. One line per change, using + for added, - for removed and ~ for changed, ready for a pull request, ticket or chat message.

Ordered or unordered lists

By default, arrays are compared item by item, because order is part of the data in JSON. When order doesn’t matter, such as a list of tags or permissions, tick Ignore order of array items. Identical items are then matched wherever they are, and objects are paired by an id-like field (id, key, sku …) or by their shared fields. Only real changes are reported: an item that was added or removed, or the fields that changed inside a record that moved, with its old position shown too.

Common uses

Compare API responses between staging and production, check what changed between two versions of a config file or package.json, review a data migration, or debug a test whose expected and actual JSON don’t match. Everything runs in your browser, so confidential data stays private.

Frequently asked questions

Does key order count as a difference?

No. JSON objects have no order, so the tool compares keys by name. Two documents with the same data written in a different order show no differences.

How are arrays compared?

By position, because order matters in a JSON list. The first item is compared with the first, the second with the second, and so on. If your lists can be in any order, tick Ignore order of array items to compare them as unordered collections.

What is a type change?

A value whose JSON type changed, for example the number 5 becoming the string "5", or an object becoming an array. These are listed as changes and are often the cause of hard-to-find bugs.

What's the difference between the two tabs?

Changes is a precise list of data differences, best for understanding what changed. Line diff shows both documents formatted the same way and highlights changed lines, which is best for seeing changes in context.

Is my data uploaded?

No. Both documents are compared in your browser and never leave your device.

Tutorials