JSON Compare – Find Differences Online

Compare two JSON files and see exactly what was added, removed or changed. Key order is ignored. Your data never leaves your browser.

Original

Empty

Modified

Empty

Differences

The differences will appear here.
Not compared yet

What Is a JSON Compare Tool?

A JSON compare tool (also called a JSON diff tool) checks two JSON documents and lists every difference between them. It is useful when you want to see what changed between two API responses, two versions of a config file, or test data before and after an update.

How to Compare Two JSON Files

  1. Paste the original JSON into the left box and the changed JSON into the right box. You can also drop a .json file on each box, click Upload, or load a file from a link with URL.
  2. Click Compare JSON, or press Ctrl + Enter.
  3. Read the list of differences. Use the Added, Removed and Changed tabs to filter it.
  4. Click Swap to compare in the other direction.

Features

  • Shows added, removed and changed values with their full path, like $.address.city.
  • Ignores key order, so {"a":1,"b":2} and {"b":2,"a":1} count as the same.
  • Compares nested objects and arrays at any depth.
  • Repairs small mistakes like trailing commas automatically before comparing.
  • Share a comparison of two online files as one link: /json-compare?url=FIRST&url2=SECOND opens both. Or send JSON here from the Formatter or Viewer with Open in.
  • Works in your browser. Your JSON is never uploaded.

How to Read the Results

Every difference is shown with its path, which tells you exactly where it is. $ means the top of the document, a dot goes into an object, and a number in brackets is a position in an array. For example:

  • $.email: the email field at the top level.
  • $.address.city: the city inside the address object.
  • $.orders[2].total: the total of the third order (arrays start at 0).

Added means the value only exists in the modified JSON, Removed means it only exists in the original, and Changed shows the old value and the new value side by side.

Common Uses

  • API testing: compare the response before and after a code change to catch fields that disappeared or changed type.
  • Config files: see what differs between the settings on your laptop and on the server, for example in package.json or appsettings.json.
  • Data migrations: check that a record looks the same after it was exported and imported again.
  • Code reviews: understand a large JSON change faster than reading a text diff line by line.

JSON Compare vs Text Compare

A normal text diff compares line by line, so it reports changes when only the spacing or the key order is different. This tool understands JSON: it ignores formatting and key order and only reports real changes in the data. To compare any other kind of text, such as code or plain text, use Text Compare.

Frequently Asked Questions

Does the order of keys matter?

No. JSON objects have no fixed key order, so this tool compares keys by name. Array items are compared by position, because order matters in arrays.

Is my data sent to a server?

No. Both JSON documents are compared inside your browser.

What if my JSON has an error?

The broken line is highlighted in red. Small mistakes are fixed automatically. For bigger problems, use our JSON Formatter to repair the JSON or the JSON Validator to find the exact error.