Text Compare (Diff Checker)

Compare two versions of a text line by line and highlight added, removed and unchanged lines. Optionally ignore case and whitespace. Nothing is uploaded.

How to use the text Compare (Diff Checker)

  1. Paste the original version into the first box.
  2. Paste the new version into the second box.
  3. Tick Ignore upper/lower case or Ignore extra spaces if those differences don't matter to you.
  4. Read the result: lines marked + in green were added, lines marked − in red were removed, and plain lines are unchanged. A changed line shows as one removal followed by one addition.
  5. The result updates instantly as you type. There is no button to press.
  6. Use Copy result to copy the figures, or Copy link to share a link that reopens the text Compare (Diff Checker) with the same inputs.

How it works

Spotting what changed between two versions of a document, a contract, a list, a configuration file or some code is hard by eye. This tool compares the two texts line by line and marks every line that was added, removed or left unchanged, the same way software developers review changes with "diff" tools.

It finds the longest common subsequence of lines: the largest set of lines that appear in both texts in the same order. Those are the unchanged lines. Everything else in the original was removed and everything else in the new version was added. This is the classic algorithm behind the Unix diff command, and it gives the smallest set of changes that turns one text into the other. Matching lines at the start and end are skipped before the main comparison, which keeps large documents with small edits fast.

Comparison is by whole line. If one word in a sentence changes, that line appears as removed and then added, so for prose it helps to put each sentence on its own line first. The options let you ignore differences in capitalisation and in spacing, such as a trailing space or a double space. The similarity score is the share of lines that are unchanged across both versions. Both texts stay in your browser and are never uploaded.

Formula

LCS(i, j) = LCS(i+1, j+1) + 1 if line Aᵢ = line Bⱼ = max(LCS(i+1, j), LCS(i, j+1)) otherwise similarity = 2 × unchanged / (lines in A + lines in B)

Example

Comparing Apples, Bananas, Cherries, Dates, Elderberries with Apples, Blueberries, Cherries, Dates, Figs, Elderberries shows "Bananas" removed, "Blueberries" and "Figs" added, and 4 lines unchanged. The similarity is 2 × 4 ÷ (5 + 6) ≈ 72.7%.

Frequently asked questions

Does it show changes within a line?

No. It compares whole lines, so an edited line appears as one removal plus one addition. Splitting text into one sentence per line gives a finer comparison.

Is my text uploaded to a server?

No. The comparison runs entirely in your browser, so it's safe for confidential documents. The texts are also kept out of the share link.

How large can the texts be?

Up to 5,000 lines each. Long documents with mostly unchanged sections compare quickly, because matching lines at the start and end are skipped.