Free · runs in your browser · no upload · no quota
Text Compare
Paste two versions of a text, a contract, an article or source code, and see exactly what changed: removed lines in red, added lines in green and the changed words inside them highlighted. Compare by line, word or character, and download the changes as a .diff file.
Good to know
It finds the smallest set of changes.
The comparison uses the Myers algorithm, the same as git: it reports the fewest lines (or words) to remove and add to turn one text into the other. When a block moves, that is shown as removed in one place and added in another.
Long unchanged stretches are folded.
More than eight identical lines in a row collapse to the first and last three, so the changes stay in view.
Very different texts are not compared in detail.
Above about 3,000 differences the comparison stops and says so, because two unrelated texts are not worth the wait. Comparing by lines usually gets under the limit when words or characters do not.
Line endings count.
A file saved on Windows (CRLF) and the same file from Linux or a Mac (LF) look identical but differ on every line. Tick Ignore spacing to compare them anyway.
How to Compare Two Texts
- Paste both versions
The original on the left, the changed version on the right. You can also drop or open a text file into either box. - Choose how to compare
Lines suits code and lists, Words suits prose, Characters finds single typos. Tick Ignore case or Ignore spacing to skip differences that do not matter to you. - Read or save the result
Differences appear below as you type, with a count of what was removed and added. In line mode, Download .diff saves them in the unified format that git and patch use.
Example
1. The launch moves to Friday. 2. Marko sends the price list.
- 1. The launch moves to Friday. + 1. The launch moves to Thursday. 2. Marko sends the price list.
Frequently Asked Questions
-
Lines, words or characters: which should I use?Lines for code, configuration files, lists and anything where line breaks matter; the changed words inside a changed line are still highlighted. Words for paragraphs of prose, where one edit would otherwise mark a whole long line. Characters to spot a single wrong letter or digit, for example in a reference number.
-
What do Ignore case and Ignore spacing do?Ignore case treats Hello and hello as the same. Ignore spacing treats any run of spaces and tabs as one space and ignores spaces at the start and end of a line, which hides indentation changes. The text is still shown as written.
-
Can I compare Word or PDF documents?Paste their text, or convert them to text first with our DOCX to TXT or PDF to TXT converter and open the results here. To compare two PDFs page by page, including layout, use Compare PDF.
-
What is the .diff file?A unified diff: the format of
git diffanddiff -u, with three lines of context around each change. It can be read in any code editor or applied with thepatchcommand. -
Is my text uploaded?No. The comparison runs in your browser, so contracts, code and private documents never leave your device.
More browser tools
Working with files rather than text? Our file converters handle DOCX to TXT, PDF to TXT and 500+ other formats.