Browser-local comparison

JSON Diff

Compare two JSON documents and see every path that was added, removed, or changed, with both values on the same line.

JSON Diff

Processed in this browser
Paste the older document
Paste the newer document
Ready to copy

How to use it

A short path from source data to a usable local result.

01

Add both documents

Paste the older one on the left and the newer one on the right, or upload a file into each panel.

02

Run the comparison

Both are parsed, then walked together key by key and index by index.

03

Read the report

Each line is one path: a plus for added, a minus for removed, a tilde for changed with both values.

Common questions

Details that matter when moving data between formats.

What counts as a difference?

A path that exists on one side only, or a value that changed. Whitespace, indentation, and key order do not count, because both documents are compared as parsed values.

How are arrays compared?

By index. A new item at the front of a list shifts every later item, so it shows as a change at each index rather than as a single insertion.

How are numbers compared?

As numbers, so 1 and 1.0 are equal. A value that is a string on one side and a number on the other is reported as a type change.

Are the documents uploaded?

No. Both are parsed in this tab and neither is sent to a server.

Related tools

Other focused converters that are already available.

When is JSON Diff useful?

A JSON diff answers the question a text diff answers badly: what actually changed between two versions of a structured document. A text diff on JSON is noisy, because reordering keys, re-indenting a block, or minifying a file rewrites lines that carry no change in meaning. This page parses both documents first and then walks them together, so only a real difference appears: a path that exists on one side only, or a value that differs. Whitespace, indentation, and key order are ignored because they are already gone by the time the comparison starts.

Every line of the report is one path. A plus sign marks a path that exists only in the second document, a minus sign marks a path that exists only in the first, and a tilde marks a path whose value changed, with the old value and the new value on the same line. A path is written with slashes, so a city inside a customer object is reported as /customer/city and the second item of a list is /items/1, and a key that itself contains a slash is escaped so the path stays unambiguous. A change of type is called out as well, because a number that became a string breaks a comparison downstream even when the two look alike on screen.

This is also a JSON compare tool: it compares parsed values rather than raw line order. Two behaviours are worth knowing before reading a report. Arrays are compared by index, which is the honest way to compare a list without guessing intent: an item inserted at the front of a ten-item list shifts every later index and is reported as ten changes rather than one insertion. Numbers are compared as numbers, so 1 and 1.0 are equal, while the string 1 against the number 1 is a type change. The summary line counts added, removed, and changed paths, so the size of a change is visible before reading it. Both documents are parsed in the tab and neither is uploaded; when one of them fails to parse, the message names which side and at what line and column.