Compare two texts

See what changed between two texts.

Paste original and modified text. See a line-level diff with inline word-level highlight on changed lines. Toggle unified or side-by-side. Pure browser; no login.

+2-2=1
The quick brown fox
-jumps over the lazy dog
-and runs away.
+leaps over the lazy dog
+and runs home.

Comparing two versions of a text

A diff shows exactly what changed between two versions of something: which lines were removed, which were added and which stayed the same. Programmers live with diffs in Git, but they are just as useful for contracts, configuration files, translations, essays or two exports of the same spreadsheet.

Paste the original on one side and the changed version on the other. The viewer marks every line as kept, removed or added, highlights the changed words inside modified lines, and counts the changes. Everything runs in your browser, so confidential documents stay on your machine.

How to use it

  1. Paste the original text into the left box.
  2. Paste the modified text into the right box.
  3. Choose Unified to read the changes as one list, or Side-by-side to see both versions aligned.
  4. Use the +, - and = counters to see how much changed: lines added, lines removed and lines unchanged.

Example: one line changed, one line added

Input
Original:
apples
bananas
cherries

Modified:
apples
blueberries
cherries
dates
Output
  apples
- bananas
+ blueberries
  cherries
+ dates

+2 -1 =2

A changed line shows up as a removal followed by an addition. Inside it, the word-level highlight shows which part of the line actually differs.

How the comparison works

The viewer finds the longest common subsequence of lines: the largest set of lines that appear in both texts in the same order. Those are shown as unchanged, and everything else is a removal or an addition. This is the classic approach behind Unix diff, and it always finds a minimal set of changes.

The method compares every line of one side with every line of the other, so the work grows with the product of the two lengths. A few thousand lines per side is instant; for very large files, a command-line tool such as git diff --no-index is faster.

Invisible differences

Two lines that look the same can still differ. Trailing spaces, tabs versus spaces, and a non-breaking space pasted from a web page all count as changes. Line endings are handled for you: Windows (CRLF), Unix (LF) and old Mac (CR) breaks are all treated as the same line break, so a file saved on another system does not show every line as changed.

If a whole paragraph appears as changed when only one word differs, the paragraph is probably a single long line. Break long lines into sentences before comparing to get a more useful result.

Questions

Is my text uploaded?

No. Both texts are compared in your browser. Nothing is sent or stored.

Can I compare Word or PDF files?

Copy the text out of the documents and paste it here. Formatting such as bold or tables is not compared, only the text.

Can it ignore whitespace or letter case?

Not yet; the comparison is exact. Normalise both texts first, for example with the case converter, if you only care about the words.