Text Compare

Paste the old version on the left and the new one on the right. Every line is marked as unchanged, added or removed, and inside a changed line the words that differ are highlighted.

Runs entirely in your browser. Your files are never uploaded.

How to use Text Compare

  1. 1Paste the first version into the left box.
  2. 2Paste the second version into the right box.
  3. 3Read the marked result underneath.
  4. 4Switch on the whitespace or case options if the differences are noise.

A real diff, not a line-by-line check

Comparing two texts position by position sounds reasonable until someone adds a sentence at the top. Every line below it shifts down by one, and a positional comparison reports the entire document as changed.

This uses the algorithm that version control uses, which looks for the shortest set of edits that turns one text into the other. Add one line and it reports one added line, with everything else recognised as unchanged however far it moved.

Changed words inside a changed line

A line marked as changed is really a removal and an addition sitting next to each other, so the same comparison runs again inside the pair, word by word. One altered figure in a long paragraph shows as that figure highlighted, instead of leaving you to read both versions of the paragraph and spot it yourself.

When case and spacing are not the point

Two options turn off differences you may not care about. Ignoring whitespace compares lines with their indentation and repeated spaces collapsed, which is what you want after reformatting code or re-wrapping a paragraph. Ignoring case compares letters without regard to capitals.

Both change what counts as equal, and neither changes what gets shown. The line you see is always the line you pasted.

Limits

  • Each side is limited to 20,000 lines. Compare a section rather than a whole book.
  • Two texts with no lines in common are reported as one block replacing another.
  • It compares the text, so bold, fonts and colours are invisible to it.
  • Moved blocks read as a removal in one place and an addition in another.

Frequently asked questions

Can I compare two files instead of pasting?
Open each file in any editor and paste its text in. Reading files directly is on the list, and for PDFs there is already a dedicated Compare PDF tool that works on pages rather than lines.
Why is a moved paragraph shown as removed and added?
Because that is the shortest description of the change. A line-based comparison records that text left one position and appeared at another, and it has no concept of a move. Version control tools show the same thing for the same reason.
Is this suitable for comparing code?
Yes, with the whitespace option on if the indentation changed. There is no syntax awareness, so a reformatted file shows more changes than a code-aware diff would.
Does the comparison happen on a server?
No. Both texts stay in your browser, which matters when the two versions are a contract or an unpublished draft. Nothing is uploaded and nothing is logged.