Compare two blocks of text
Paste two versions and see exactly which lines were added or removed, with a count of each and the changed lines listed in order.
- Free, unlimited
- 100% on-device
- No sign-up
Compare two blocks of text
Result
| # | Word | Count | Share | Bar |
|---|
Three steps — nothing to install
Paste the first version
The older text, in the top box. Line breaks define what counts as a line.
Paste the second version
The newer text, in the second box. It can be longer, shorter or the same length.
Read the difference
Removed lines are marked −, added lines +, and the summary counts both.
How a line diff works
The two texts are split into lines and compared with a longest-common-subsequence pass: the algorithm finds the largest set of lines that appear in both, in the same order, and everything between them is a change. That is the same idea behind git diff and every code review tool.
Because matching is on whole lines, a line with one changed word shows as one removed line and one added line. That is honest about what changed but noisier than a word-level comparison, which is why review tools show changed lines rather than counting words.
Reading the result
Removed lines are listed first within each block of change, then added ones, each with a sign. Identical text produces no list at all and a summary of zero. The summary counts lines, not characters, so a reflowed paragraph counts as every line changed.
Two options change the comparison: ignoring capitalisation treats Goa and goa as the same line, and ignoring spaces inside a line treats a b as a b. Both are useful for prose and wrong for code, where case and spacing carry meaning.
When a diff is the wrong tool
If the two texts are the same content with different wrapping, unwrap them first with remove line breaks, or every visual line will count as a change. If one text is a translation of the other, a diff will mark everything; a side-by-side reading is better. And if you are comparing two PDFs rather than their text, compare PDF renders both pages and compares the pixels and the text together.
The comparison is quadratic in the worst case, so it is capped at about four million line pairs. Beyond that the tool lists the differing blocks without trying to align every line, and says so.