Back to home

JSON Compare

Paste two JSON documents. The tool finds every difference by path, so you can see exactly which values were added, removed or changed.

  1. Paste the two JSON documents
  2. Choose whether array order matters
  3. Read the list of differences
Loading the tool...

Your files never leave your device

How to compare two JSON documents

Paste the two documents into the boxes A and B. The tool lists every difference as added, removed or changed, together with a path that shows where it is and the values on both sides. If one document is not valid JSON, a message tells you which side has the error.

A worked example

Let document A have the key name with the value Ann, the key tags with the list a, b, and the key meta containing the key beta set to 1. Document B is the same, except that its tags list is b, a and its beta is 2. By default the tool reports three differences: $.tags[0] changed from a to b, $.tags[1] changed from b to a and $.meta.beta changed from 1 to 2. With the option to ignore array order on, the tags are equal and only the change at $.meta.beta remains.

Limits and good practice

Only the first 500 differences are listed, which is plenty for finding the cause of a change but not for a complete audit of two unrelated files. Ignore array order only when the order has no meaning, for example a set of tags, and keep it off for lists where position matters, such as steps. If your documents are hard to read, format them first with the JSON Formatter.

Frequently asked questions

What do the paths mean?

$ is the root, .name is an object key and [0] is the first item of an array. So $.meta.beta is the key beta inside meta.

Does key order matter?

No. Two objects with the same keys and values are equal in any order.

What does ignoring array order do?

Arrays are sorted by content before they are compared, so [1, 2] equals [2, 1].

Can it compare large files?

Yes, as far as your browser memory allows. Only the first 500 differences are listed.

What if my JSON is invalid?

A message shows which side has the error and where it is, so you can fix it and compare again.

Is my data uploaded?

No. Both documents stay on your device.

Related tools

Save this tool to use it later

Add this page to your browser bookmarks by pressing Ctrl + D