Compare two texts

Paste two versions of a document, contract, essay or piece of code to see exactly what changed, line by line and word by word.

Runs in your browser. Nothing is uploaded.

0 0

How to use it

  1. Paste the older version into Original text and the newer one into Changed text. The examples show how it looks.
  2. The differences appear below straight away: removed lines in red on the left, added lines in green on the right.
  3. Inside a changed line, the exact words that differ are highlighted more strongly.
  4. Switch to Inline for a single column, which is easier on a phone, and tick Ignore case or Ignore whitespace to hide changes you do not care about.

Reading the result

  • Green with a line number on the right: a line that is only in the changed text (an addition).
  • Red with a line number on the left: a line that is only in the original (a deletion).
  • Red and green on the same row: a line that was edited. It counts as one deletion and one addition, the same way Git and most diff tools count it, and the words that changed are highlighted.
  • Hatched space: there is no matching line on that side.

The comparison works line by line, so it is best for text with line breaks: code, lists, CSV files, poems, or documents pasted with one paragraph per line. Two long paragraphs that differ by one word will show as one changed line with that word highlighted.

When to ignore case and whitespace

Ignore whitespace treats lines as the same if they differ only in spaces, tabs or indentation. Use it for code that has been re-indented, or text copied from a PDF with odd spacing. Ignore case treats Hello and HELLO as the same, which helps when one version was converted to capitals.

The text shown is always exactly what you pasted; the options only change what counts as a difference.

Questions

Are my texts uploaded?
No. The comparison runs in your browser, so you can safely compare contracts, private documents and code you cannot share.
How large a text can I compare?
Tens of thousands of lines are fine on a laptop. Very large texts that are almost entirely different can take too long; if that happens the tool says so, and comparing one section at a time works.
Can I compare Word or PDF files?
Not directly. Open the document, select all the text, copy it and paste it into one of the boxes. For PDFs, copying from a PDF viewer usually works, though line breaks may fall in different places.
Why is a whole paragraph marked as changed when I only edited one word?
The comparison works on lines, and a paragraph is one long line. Look inside the row: the word you changed is highlighted more strongly than the rest.