How to use it
- Paste the original text in the left box and the changed text in the right box.
- Choose whether to compare by lines (best for code, lists and data) or by words (best for prose).
- Optionally ignore differences in letter case or in spaces.
- Read the result: removed parts are marked with − and a red background, added parts with + and a green background. Use “Swap” to reverse the direction.
How it works
The comparison uses the Myers difference algorithm, the same approach used by Git and most diff programs. It finds the smallest set of additions and removals that turns the original into the changed text, and everything else is shown as unchanged. A line or word that was edited appears as a removal followed by an addition.
In line mode, each line is compared as a whole, and the result shows the line numbers in both versions. Windows and Unix line endings are treated the same, and a final line break is ignored. In word mode, the texts are split into words and the spaces between them, and runs of changes are shown inline; the counts include words only, not spaces. Punctuation attached to a word is part of that word, so “end.” and “end” differ.
“Ignore case” treats “Hello” and “hello” as equal. “Ignore differences in spaces” treats lines as equal when they differ only in spaces at the start or end or in the number of spaces between words; in word mode any amount of whitespace counts as the same. Ignored differences are shown with the text of the changed version.
To keep the page responsive, each text may have up to 5,000 lines in line mode and 3,000 words in word mode. Changes are marked by both colour and a + or − sign, and screen readers announce them as added or removed.
Examples
Checking what changed in a contract
Paste last month's terms and this month's version in word mode. A change from “30 days” to “14 days” shows “30” removed and “14” added in the same sentence, so small edits cannot slip through.
Comparing two configuration files
In line mode with “Ignore differences in spaces”, re-indented lines are not reported, and only the lines whose values really changed are marked, with their line numbers in both files.
Reviewing edits to an article
Paste the draft and the edited text in word mode to see every word the editor added or removed, without needing tracked changes in a word processor.
Frequently asked questions
Should I use line or word mode?
Line mode is best for code, lists, CSV and configuration files, where each line is a unit. Word mode is best for paragraphs of prose, where a single changed word would otherwise mark the whole paragraph as changed.
Why is a modified line shown as removed and added?
A diff describes changes as removals and additions. An edited line is the old line removed and the new line added. Switch to word mode to see which words inside it changed.
Is there a size limit?
Yes: 5,000 lines per text in line mode and 3,000 words per text in word mode. Very different texts take the longest to compare, and the limits keep the page from freezing on slower devices.
Can I compare Word or PDF files?
Not directly. Copy the text out of each document and paste it into the boxes. Formatting such as bold or fonts is not compared, only the text.
Privacy
Both texts are compared only in your browser. Nothing is uploaded, stored or included in analytics.