JSON Diff
1added1removed3changed

Original (A)

Changed (B)

Differences

5 diffs
PathChangeBeforeAfter
$.licenseadded"MIT"
$.versionchanged23
$.tags[2]removed"seo"
$.owner.idchanged79
$.owner.activechangedtruefalse

JSON Diff

Compare two JSON documents side by side and see exactly what changed. Paste your before and after JSON into the live tool — every added, removed and changed value is reported as a precise JSON path.

About this tool

What is it?
DataFormatter JSON Diff is a free online tool that compares two JSON documents side by side and reports added, removed and changed values as precise dot paths.
Who is it for?
Developers reviewing changes to an API response, config file or data contract between two versions.
What makes DataFormatter's tool different?
Comparison runs entirely in your browser, so the JSON you paste is never uploaded, and results are listed as exact dot paths rather than a vague visual diff.

Quick start

  1. Paste the original JSON into Original (A) and the edited version into Changed (B).
  2. Read the summary chips for added, removed and changed counts.
  3. Scan the table: each row shows the path, the kind of change, and the before/after values.
  4. Switch to Unified for a copy-paste friendly, line-oriented view of the same diff.

What JSON diff compares

The tool parses both documents completely before comparing, so ordering inside objects and all whitespace are correctly ignored — only meaningful differences surface. Comparison rules:

  • Objects compare key by key; key order never matters.
  • Arrays compare element by element at the same index.
  • Values compare strictly: number, string, boolean, null and nested value all have distinct types.
  • A type change ("version": 2 vs "version": "2") is a changed value, reported with before and after.

How to diff JSON online

  • Paste the two versions into the A and B editors — results update instantly.
  • Use Swap to flip which side is treated as original.
  • Click Expanded rows count to jump past huge tables, or use Copy Diff to hand the result to a colleague.
  • Keep everything in-browser for private payloads: nothing is transmitted.
Change to one side
{ "name": "Sketch", "version": 2, "tags": ["free", "pro"] }
What the diff reports
- $.version  before 2
+ $.version  after 3
- $.tags[1] before "pro"
+ $.license  after "MIT"

Who diffs JSON — and when

Reviewing teammate PRs

A config or fixture changed in a pull request — but the diff is buried in a giant file. Paste both versions here to see a compact list of what actually moved.

Confirming API response drift

Run an endpoint before and after a deploy, save both responses, and diff them. You'll see exactly which fields the new version added, removed or renamed.

Verifying migrations

Diff the exported state before and after a data migration to confirm only the intended keys changed.

Common diff surprises

"7" != 7

Why: One document stores numbers as numbers, the other as quoted strings (for example an export that quotes everything).

Fix: Normalize types on one side before comparing — parse the numeric strings back to numbers.

Everything shifted, table is a sea of red

Why: An element was inserted or removed in the middle of an array, shifting every later index.

Fix: Diff at the object level instead, or sort array records by a stable key so positions align.

Parse error on one side

Why: A truncated or malformed document — often a copy that ended mid-payload.

Fix: Re-copy the full document; the reported line and column points at the first invalid token.

Pro tips

  • Tiny formatting changes never appear — the diff is structural, not textual.
  • Nested changes are flattened to dot paths like $.owner.address.city so they're easy to locate and reason about.
  • Still using someone else's online diff tool? This one never sends your API responses across the network.

Frequently asked questions

How does this JSON diff tool compare my documents?

Both documents are parsed into trees, then walked together by key. Values are compared strictly (7, 7.0 and "7" all differ); arrays are compared position by position. You get one row per path where the value was added, removed or changed.

Can it tell the difference between an added value and a changed one?

Yes. When a key exists on both sides but the value differs you get a "changed" row showing before and after. Rows with only an after value are "added"; only a before value are "removed".

Does it ignore whitespace and key order?

Whitespace is ignored completely — diffs are taken on parsed JSON, not text. Key order is also ignored for objects (it is meaningless in JSON), but element order inside arrays is significant and positional.

Is my JSON uploaded anywhere?

No. The entire diff runs locally in your browser. Nothing you paste ever leaves this page.

What if one of my documents isn't valid JSON?

The diff for that side is skipped and the parse error is shown in the results box, along with the location (line/column) of the problem so you can fix it.

Can I copy or save the diff?

Yes. Copy Diff copies a unified, line-oriented view of every change (paths prefixed + and -); Download saves that same view as a text file.

Related tools

Last reviewed September 2026 · DataFormatter team — this tool processes data locally in your browser.