Skip to content

JSON Diff — Compare Two JSON

Compare two JSON documents and see every added, removed and changed value with its exact path — plus a JSON Patch you can apply.

About JSON Diff — Compare Two JSON

JSON Diff compares two JSON files or API responses and lists each difference with its exact path, such as $.manager.name. Added, removed and changed values are colour-coded and can be filtered, and key order is ignored so only real changes show up.

Tick “Treat arrays as unordered” to compare lists as sets, use Format both to tidy pasted text, and copy the generated JSON Patch (RFC 6902) to apply the same change in code. It is useful for checking config changes, test fixtures and API versions. The comparison runs entirely in your browser.

How to use JSON Diff — Compare Two JSON

  1. Paste the original JSON on the left and the changed JSON on the right.
  2. The differences appear as you type, with the path of each value.
  3. Filter by added, removed or changed; tick “arrays as unordered” to ignore item order.
  4. Copy or download the JSON Patch (RFC 6902) that turns the original into the changed version.

Frequently asked questions

Does key order matter?

No. Objects are compared by key, so {"a":1,"b":2} and {"b":2,"a":1} are equal. Array items are compared by position unless you tick “Treat arrays as unordered”.

What is a JSON Patch?

A standard (RFC 6902) list of operations — add, remove, replace — that turns one JSON document into another. Many libraries and APIs (for example Kubernetes) can apply it directly.

Is 1 the same as "1"?

No. A number and a string are different JSON types, so the tool reports the value as changed.

How do I compare two JSON files online?

Paste the first file on the left and the second on the right. The list below shows every difference with its path, and the counts tell you how many values were added, removed or changed.

Can I compare JSON ignoring the order of keys?

Yes. Objects are always compared by key, so the order of keys never counts as a difference.

What is the difference between a text diff and a JSON diff?

A text diff compares lines, so reformatting or reordering keys shows up as changes. A JSON diff compares the data itself and reports only values that really changed.

People also search for

json diff · json compare · compare json online · json diff online · compare two json · json comparison tool · json difference checker · json compare online free · json patch generator · compare json files

Related tools