JSON diff

Paste two JSON documents and get the list of what was added, removed or changed, each with its path. Key order does not matter, and you can ignore the order of items in lists.

  • Free
  • No sign-up
  • Runs in your browser
json-diff

Fill in the values above to see the result.

100% private — the calculation is done in your browser and nothing is sent to any server.

Next step

Keep going with your result in another tool. Nothing is uploaded.

How it works

Paste both documents

The original on the left, the new one on the right.

Read the differences

Added, removed and changed values, each with its path.

Copy the list

For a bug report, a review or a changelog.

Find what changed between two JSON documents

JSON is everywhere: API responses, configuration files, exported data, package manifests. Sooner or later you need to know what differs between two versions of one: a response before and after a change, the config of two environments or a file that a colleague edited. A normal text comparison is a poor fit because JSON can be formatted in many ways, and the same content can appear with different spacing or with the keys in another order. This tool compares the data, not the text.

How the comparison works

Both documents are parsed and their structures are compared, walking through every object and list. For each difference you get the path in a form such as $.address.city or $.tags[1], and its kind:

  • Added: a key or item that exists only in the new document.
  • Removed: a key or item that exists only in the original.
  • Changed: the same place holds a different value, shown as old value and new value. If the type changed, for instance from a number to a string, it is flagged too.

What is ignored and what is not

The order of the keys in an object never matters, because in JSON an object is an unordered set of pairs. Spacing and line breaks are ignored, and the numbers 1 and 1.0 are treated as equal. For lists you choose: by default items are compared by position, so inserting an item at the start shifts everything after it. If the order of the items is not meaningful, choose to ignore it and the tool matches equal items wherever they are.

Errors in the JSON

If one of the documents is not valid JSON, the tool says which one, and shows the line and column of the problem so you can fix it, with an explanation such as a missing comma or an unclosed quote.

Limits

It shows up to 500 differences. Very large numbers are compared by their written value, so they are not rounded. It does not merge the two documents or produce a patch. Both texts stay in your browser. To tidy a document before comparing it, use the JSON formatter.

Frequently asked questions

How do I compare two JSON files?
Paste the original in the left box and the new one in the right box. The differences appear straight away, each with its path.
Does the order of the keys matter?
No. Two objects with the same keys and values in a different order are considered identical.
How are arrays compared?
By position by default. You can choose to ignore the order of the items, and then equal items match wherever they are.
What does a difference in the type mean?
The same place holds a different kind of value in each document, for example the number 5 in one and the text "5" in the other.
Can it tell me where my JSON is invalid?
Yes. It reports which document is wrong, with the line and column of the problem.
Are my documents uploaded?
No. The comparison is done in your browser.