Free online tool

JSON Diff

Paste two JSON documents and see every added, removed and changed value by its path.

Upload a file

Drop your file hereTap to choose a file

or click to browse, or paste from the clipboard

Compares data, not text

Both documents are parsed and compared value by value. Key order, indentation and line breaks are ignored, objects are matched by key and arrays by position, and each difference is labeled Added, Removed or Changed with a JSON Pointer path.

Exact number comparison

Numbers are compared as exact decimals, so 1, 1.0 and 1e0 are equal while two 19-digit IDs that differ only in the last digit are not. Nothing is rounded to floating point along the way.

A summary you can keep

Results appear as a table and as a JSON summary you can copy or download. It holds up to 1,000 changes with before and after previews of 150 characters each, and a truncated flag says when that limit was reached.

How to compare two JSON documents

  1. 1

    Paste the original JSON on the left and the updated JSON on the right.

  2. 2

    Select Compare JSON.

  3. 3

    Read the table: each row gives the change type, the JSON Pointer path and the before and after values.

  4. 4

    Select Copy summary or Download summary to keep the report as json-diff-summary.json.

What people use this tool for

  • See exactly which fields changed between two versions of an API response.
  • Review an edited configuration or package file whose keys were reordered by a formatter.
  • Confirm that a migration or export script produced the same data as the original.
  • Attach a machine-readable list of changes to a bug report or code review.

Frequently Asked Questions

How do I compare two JSON files?

Open each file in a text editor, paste the older version into Original JSON and the newer one into Updated JSON, then select Compare JSON. Each difference appears as a table row with the change type, the path to the value, and the value before and after. If nothing differs, the tool reports No differences.

Does key order or formatting count as a change?

No. Objects are compared by key, so the same members in a different order are equal, and whitespace is ignored entirely. Strings are compared after their escapes are decoded, so "\u0041" equals "A". A value that changes type, such as the number 1 becoming the string "1", is reported as Changed.

How are arrays compared?

By position. Item 0 is compared with item 0, item 1 with item 1, and so on. Inserting or removing an element near the start shifts everything after it, which produces a run of Changed rows and one Added or Removed row at the end. The tool does not detect moved items or match array elements by an id field.

How do I read the paths?

Paths are JSON Pointers. /users/2/email means the email member of the third item in the users array, because array positions count from zero. Inside a key, a slash is written as ~1 and a tilde as ~0. A difference at the top level of the document is shown as (root).

What happens when a whole object is added or removed?

It is reported once, at the path of the object, with a preview of its contents cut at 150 characters. The tool does not list every nested field of an added or removed branch. The same applies when a value changes type, for example from an object to an array.

Why does it say a document is invalid or has a duplicate key?

Both sides must be strict JSON: double-quoted keys and strings, no comments and no trailing commas. The message names the side, Original or Updated, and the line and column of the problem. An object that repeats a key is refused as well, because it is unclear which value should be compared. Remove or rename the duplicate and compare again.

What are the limits?

Each document can be up to 250,000 characters and 128 levels deep. The report stops at 1,000 differences and sets truncated to true in the summary, so compare smaller sections if you reach it. Before and after values are previews, shortened to 150 characters.

Are my documents uploaded?

No. Parsing and comparison run in your browser, and the summary file is generated on your device, so API responses and configuration files that hold keys or customer data are not sent anywhere. Editing either box clears the previous result.