DiffDuo

Free online JSON diff tool

JSON Compare: see what changed

Compare two JSON files, API responses or configs and see every added, removed and changed value by its path. Key order and formatting don't matter. Private and free, right in your browser.

 
 
Comparing…

How to compare two JSON files

  1. Paste or open the original JSONPut the first JSON document in the Original JSON box. You can paste it, or open or drag and drop a .json file.
  2. Add the changed JSONPut the second document in the Changed JSON box. Both are checked for errors and compared as you type.
  3. Review the changesSee a list of every changed, added and removed value by its path, plus a side-by-side diff of both documents with their keys sorted.

A JSON diff that understands JSON

Key order doesn't matter

Objects are compared by their keys, so the same data in a different order counts as equal.

Every change by path

Each difference is listed with its exact location, such as $.user.roles[2], and the old and new value.

Ignore array order

Turn it on when arrays are sets, like tags or IDs, and only additions and removals matter.

Finds invalid JSON

If a document can't be parsed, you see the line and column of the error, and Format tidies valid JSON.

Handles large files

Compares JSON files with 100,000+ lines in a background thread, so the page stays responsive.

100% private

Nothing is uploaded. API responses, configs and data never leave your device.

What you can compare

API responses

Compare the response of two API versions or environments to find a changed field or a missing value.

Configuration files

Find the difference between two package.json, tsconfig, appsettings or other JSON config files.

Test fixtures and snapshots

See exactly why an expected and an actual JSON result don't match.

Data exports

Compare two exports of the same records to find what was added, removed or edited.

How to read the result

  • ~Changed values exist in both documents but are different. The old value is shown first, then the new one.
  • +Added values exist only in the changed JSON.
  • −Removed values exist only in the original JSON.
  • { }Paths such as $.settings.theme start at the document root $; [2] is the third item of an array.

Frequently asked questions

How do I compare two JSON files online?

Paste the original JSON into the left box and the changed JSON into the right box, or open the files. DiffDuo lists every changed, added and removed value by its path and shows a side-by-side diff of both documents.

Does the order of keys matter?

No. Objects are compared by their keys, so two documents with the same data in a different key order are treated as equal. Formatting and whitespace are ignored too.

Can I ignore the order of items in arrays?

Yes. Turn on Ignore array order to compare arrays as sets. Items that appear in both arrays match wherever they are, and only added or removed items are reported.

What does a path like $.user.roles[2] mean?

It is the location of the value inside the document: $ is the root, .user is the user key, .roles is its roles key and [2] is the third item of that array.

What happens if my JSON is invalid?

DiffDuo shows which document has the error and the line and column where it is, so you can fix it. The Format button indents valid JSON to make it easier to read.

Is my JSON uploaded to a server?

No. Everything runs in your browser, so your JSON never leaves your device. It is safe for API keys, customer data and internal configuration.

Can it compare large JSON files?

Yes. JSON files up to 50 MB can be opened, and the side-by-side diff runs in a background thread so the page stays responsive.

More free comparison tools