The workshop · Compare two texts
How it works : Compare two texts
Two versions of a contract, a quote, a letter: comparing them on an unknown site means handing that site both versions. Here they never leave your device, and the tool shows the change WORD BY WORD, not two whole lines painted red.
The commonest case is also the most sensitive: version 2 of a contract, a quote or an agreement lands in your inbox, and you need to know what moved since version 1. Pasting both into an online comparison tool hands both versions of the document to a stranger. Here, both texts stay on your device.
The tool uses the longest common subsequence, the algorithm behind the historic Unix comparison tool. That is not a detail: it gives the SMALLEST set of added and removed lines that explains how one text became the other. An approximate alignment often returns a wall of differences where three words changed.
And it makes a second pass WORD BY WORD over the lines that were merely modified. That is the difference between “this line changed” and “that word was replaced by this one”, and it is exactly what you are looking for when you reread a contract.
How it works
- Paste the ORIGINAL version in the top field, then click: a second box appears just below.
- Paste the MODIFIED version into that second box, and click “Compare the two versions”.
- Read the table: every removed, added or modified line is named with its number in each of the two versions.
Formats accepted
Plain text, in both boxes. The comparison runs line by line: a text that is one single paragraph is therefore compared as one block. Break your paragraphs with line breaks for a readable result.
Two texts, typed or pasted
Up to 100,000 characters each. The real limit is on the PRODUCT of the two line counts: see the limits just below.
Its limits
The limit is on the PRODUCT of the line counts, not on size
The algorithm builds a table with as many cells as the first text has lines multiplied by the second text's lines. Two texts of two thousand lines make four million cells, which is fine; two texts of ten thousand lines would make a hundred million, and the tab would freeze. The tool counts BEFORE computing and declines cleanly, giving you both numbers, instead of locking up your browser.
The comparison runs by LINES, and a text with no line breaks is one line
That is how every serious comparison tool works, and it is what allows changes to be named by position. A text pasted from a word processor as one block will therefore be compared as one block: it is the original layout that is missing, not the tool failing. The word by word second pass exists for exactly that case.
A MOVED paragraph shows up as removed here and added there
Detecting a move takes a different algorithm and, above all, an arbitrary decision: from what degree of resemblance are two distant blocks “the same one, moved”? We would rather return a result that guesses nothing. When you see the same text removed in one place and added in another, that is a move, and you read it faster than we would guess it.
Two texts that look identical can differ by invisible characters
A non-breaking space, a typographic apostrophe, a zero width character pasted from a web page: the tool sees them and reports them as a difference, which is correct but disconcerting. If the table announces a modified line whose change you cannot see, that is exactly the case, and the “Clean up pasted formatting” tool in the same corner names those characters one by one.
Questions about this tool
Are my two texts sent anywhere?
No, and that is the whole reason this tool exists. Comparing two versions of a contract on an unknown site means handing over both versions of the contract. Check it in thirty seconds: open the inspector with the F12 key, the “Network” tab, clear the list, then paste both texts and compare. Not one line appears. Cut your connection and do it again.
Why two steps instead of one screen?
Because a tool page on this site renders one single input area, and we do not invent a new component for one tool. The second box is therefore laid out by the tool inside its own result, using exactly the same component as the first. Good news along the way: the contents of the second box are kept when you change a setting, so you never paste it twice.
The table says a line changed, but I cannot see the difference.
It is nearly always an invisible character: a non-breaking space, a typographic apostrophe from a word processor, a zero width character pasted from a web page, or a line ending from another system. The tool is right, and so are your eyes. Tick “ignore differences in spacing” to check, and use the “Clean up pasted formatting” tool in the same corner: it names those characters one by one, with their code.
Why does a moved paragraph show up twice?
Because the tool does not guess moves, and that is a choice. Recognising that a block removed here is the same block added there means deciding from what degree of resemblance two distant passages are “the same”. Any answer to that question is arbitrary, and a wrong answer hides a real change. We would rather show the removal and the addition: you read the move faster than we would guess it.
Can I compare two files instead of two pasted texts?
Not directly, but open your files and paste their contents: it is the same thing. We did not add a file drop here because a comparison tool with two inputs of different kinds gets confusing in use, and because pasting a text takes two gestures. For very large files, compare section by section: the tool's limit is on the product of the line counts, and it is explained at the top of the page.
Two versions of a contract, a quote, a letter: comparing them on an unknown site means handing that site both versions. Here they never leave your device, and the tool shows the change WORD BY WORD, not two whole lines painted red.
VerifyThe proof, step by stepThe network inspector check, explained one gesture at a time, with screenshots.
The cornerThe text and data cornerCount, compare, format, clean. The small jobs that cost an hour when you do not have them at hand.