Diff checker

Compare two blocks of text and see exactly what changed, line by line.

Status
3 changed lines
Added
+2
Removed
−1
Unchanged
3
Character similarity
75.23%

Levenshtein distance

Differences

1 1 The quick brown fox
2 jumps over the lazy dog.
2 + leaps over the lazy dog.
3 3 Pack my box with five
4 4 dozen liquor jugs.
5 + Sphinx of black quartz.

How it works

This finds the longest common subsequence of the two line lists — the largest set of lines that appear in the same relative order in both — and reports everything else as an insertion or a deletion. It is the same core algorithm diff and Git use.

Why a “changed” line shows as two

Line-level diffs have no concept of editing a line: a modification is a deletion followed by an insertion. That is why a one-word change appears as a red line and a green line rather than one highlighted word.

Ignoring whitespace and case

These options change what counts as “the same line” for comparison, but the output still shows your original text. That is what you want when reformatting has churned the whitespace and you only care about substantive changes.

Similarity percentage

The similarity figure is character-level Levenshtein distance — the minimum number of single character insertions, deletions or substitutions to turn one text into the other, expressed as a percentage of the longer text. It is a different question from the line diff, and useful for “roughly how different are these?”