Text Compare: Find Differences Between Two Texts

Text compare: paste the old and the new version – removed text shows struck through with −, added text underlined with +. Nothing is uploaded.

Source: Eugene W. Myers: An O(ND) Difference Algorithm and Its Variations, Algorithmica 1 (1986). Updated: .

Your text stays in your browser – it is not sent, not stored and not added to the address bar.

You can also drop a text file onto a text box. Files are read only in your browser, never uploaded.

Lines for lists and code, words for prose, characters for typos.
Side by side shows both versions line by line with line numbers.
Multiple spaces, tabs and leading/trailing whitespace do not count as changes.
My ToolboxYour inputs are saved in this browser only.

Result

Similarity
83.33%
Added (+)
5 words
Removed (−)
1 word
Unchanged
15 words
Differences as text
Delivery takes up to [−14−]{+10+} {+working +}days. The invoice is due immediately. Returns{+ within 30 days+} are free of charge.

How it is calculated

How the text compare works

The tool splits both texts into units – lines, words or characters – and finds the longest common subsequence. Anything only in text A is removed, anything only in text B is added. It uses Eugene W. Myers’ algorithm (1986), the same idea behind diff and Git, which finds the smallest possible number of changes.

How to compare two texts

  1. Paste the old version on the left and the new one on the right.
  2. Choose “Compare by”: lines, words or characters; optionally ignore case or whitespace.
  3. Read the differences: removed text struck through with −, new text underlined with +, plus the similarity in percent.

Example: old “The contract ends on 31 March”, new “The contract ends on 30 April” – in word mode, “31 March” is marked as removed and “30 April” as added.

Similarity score

Similarity = 2 × matching units ÷ (units in A + units in B). Example: “The dog barks” and “The dog sleeps” share 2 of 3 + 3 words → 2 × 2 ÷ 6 = 67%. In word mode, spaces are not counted as words.

Readable without colour

Removed text is wrapped in <del> (struck through, marked −), added text in <ins> (underlined, marked +), so the result also works for colour-blind users, in print and with screen readers. “Differences as text” gives the same result to copy: in line mode with +/− at the start of each line, otherwise in the style [−old−]{+new+}.

Limits

Everything runs in your browser. To keep it fast, each text can have up to 100,000 characters and 20,000 units. With very many changes (over 2,000), the differing middle part is summarised roughly as removed/added – switch to line mode in that case.

More text tools: strip formatting leftovers first with the text cleaner, check the length of both versions with the word counter and create placeholder text with the lorem ipsum generator.

Side by side, jump to the next difference, files and export

The link to this page never contains your texts, only the settings.

Frequently asked questions

Are my texts stored or uploaded?

No. Both texts stay in your browser and are not added to the address bar. Only the options (mode, checkboxes) are part of the link.

Which mode should I use?

Lines for lists, code and tables, words for prose such as contracts or articles, characters for single typos, names or numbers.

Why is a changed line shown as removed and added?

A diff only knows insertions and deletions, so a changed line is “old line removed + new line added”. Switch to words or characters to see what changed inside the line.

Can I compare Word or PDF files?

Not directly – copy the text from both documents and paste it into the two boxes. Formatting such as bold or font size is not compared, only the text.

How do I compare two lists?

Paste both lists with one entry per line and choose “lines”: entries only on the left show as removed, new ones as added.

Sources and legal basis

As of: · Editorial policy

Related tools