Skip to content

JSON Diff

Compare two JSON documents and list every added, removed and changed value by path.

3 differences

Differences

PathChangeBeforeAfter
agechanged3031
tags[1]removed"b"—
cityadded—"Kandy"

Runs in your browser — nothing you enter is sent to a server.

How the JSON Diff works

Paste the original JSON on the left and the changed JSON on the right. Both are parsed and compared value by value, so formatting, indentation and key order don't count as changes — only the data does.

Every difference is listed with its path, such as user.address.city or tags[1], and marked as added, removed or changed with the old and new values. Arrays are compared position by position.

Examples

Three kinds of change

Comparing {"name":"Ana","age":30,"tags":["a","b"]} with {"name":"Ana","age":31,"tags":["a"],"city":"Paris"} finds 3 differences: age changed from 30 to 31, tags[1] ("b") was removed, and city was added.

Same data, different layout

{"a":1,"b":2} and a pretty-printed {"b": 2, "a": 1} are identical: key order and whitespace aren't differences.

Frequently asked questions

Why not use a text diff?

A text diff flags every reformatted line and reordered key. A JSON diff compares the data itself, so only real changes show. For prose or code, use the Text Difference Checker instead.

Is 1 the same as 1.0 or "1"?

1 and 1.0 are the same number in JSON. The string "1" is a different type, so it counts as a change.

How are arrays compared?

By position: item 0 with item 0, and so on. Inserting an item at the start of an array therefore shows every later item as changed.

Is my data uploaded?

No. Both documents are compared in your browser.

JSON Formatter

Format, validate and minify JSON, with the exact line and column of any error.

Developer Tools

Text Difference Checker

Compare two texts and highlight what was added, removed or changed, line by line or word by word.

Text Tools

JSON to TypeScript

Generate TypeScript interfaces from a JSON sample, with nested types, optional keys and unions.

Developer Tools