JSON

JSON Diff and Compare

Compares two JSON documents by structure and lists every path that was added, removed or changed.

Loading the tool…

Processing happens locally in your browser. What you paste or load is processed by this page and is not uploaded to a server. Nothing is stored unless you use a control that says it stores something, and you can clear anything this site has kept from the privacy page.

How to use this tool

  1. Paste the original document on the left and the changed one below it.
  2. Decide whether array order should count as a difference.
  3. Select Compare to see every added, removed and changed path.

What json diff does

A line-based diff on JSON is close to useless: reformatting a document changes every line without changing any data, and reordering keys does the same. A structural diff parses both sides first and compares values by path, so key order and whitespace are ignored and only real differences are reported.

Each difference is reported as a path such as profile.address.city or lines[2].qty, together with the old and new value. That form is directly useful in a bug report or a change request, because it names exactly the field that moved rather than describing a region of text.

Frequently asked questions

Because reformatting or reordering keys changes every line without changing any data, and a text diff reports all of it. Comparing parsed structures by path reports only the differences that matter.

No. Object key order is not significant in JSON, so it is ignored. Array order is significant by default, though you can turn that off if your arrays are really unordered sets.

As one row per changed path — for example lines[2].qty — with the old value, the new value, and whether the path was added, removed or changed. That form pastes straight into a ticket.