Diff checker

Paste the original on the left and the changed version on the right to see exactly what changed.

Tier 0 · browser · unlimited
23 characters
Differences
  apples
- bananas
+ blueberries
  cherries
+ dates
Lines added2
Lines removed1
Lines unchanged2
Identical✗

Finding what changed

Comparing two versions of a contract, a config file, an API response or a translation by eye is slow and unreliable. A diff lists exactly which lines were removed, added or kept, in the minimum number of edits. This page uses the same algorithm as Git and GNU diff and shows the result in the familiar unified format: - for lines only in the original, + for lines only in the new version.

Ignore whitespace hides changes that are only spacing or trailing spaces, typical after reformatting. Ignore case hides capitalisation changes. Context sets how many unchanged lines appear around each change.

Worked example

Original: apples, bananas, cherries. Changed: apples, blueberries, cherries, dates. The diff shows apples unchanged, - bananas, + blueberries, cherries unchanged and + dates: 2 added, 1 removed, 2 unchanged.

Privacy

Many online diff tools upload both texts. Here the comparison runs in your browser, so you can compare confidential documents safely.

How this works

The page splits both texts into lines (treating Windows and Unix line endings alike), optionally normalises whitespace and letter case, and runs Myers' O(ND) diff algorithm, which finds the shortest sequence of line insertions and deletions that turns the first text into the second. The result is printed in unified style with the number of context lines you choose around each change, and long unchanged stretches collapse to …. Counts of added, removed and unchanged lines summarise the comparison. Everything runs in this tab; neither text is uploaded.

Frequently asked

Is my text uploaded?

No. Both texts stay in your browser; the comparison runs locally.

Which algorithm is used?

Myers' O(ND) diff, the same family of algorithm used by Git and GNU diff.

Can it compare word by word?

It compares lines. Changed lines are shown in full; put one sentence per line for finer results.

Why are moved lines shown as removed and added?

Line diffs describe edits, not moves. A moved block appears as a deletion in one place and an addition in another.

Sources

Reviewed Oct 17, 2026 · test vectors fixtures/dev/diff-checker/