Compare Text
Put two versions side by side and highlight every line that was added, removed or changed.
Processed on your device — no upload
How to compare text
- Paste the original version on the left.
- Paste the new version on the right.
- Read the highlighted result — green is added, red is removed.
How it works
The comparison works on lines, using an algorithm called the longest common subsequence. Rather than comparing line 1 to line 1 and line 2 to line 2 — which falls apart the moment a single line is inserted — it finds the longest sequence of lines that appears in both texts in the same order, and treats everything else as an insertion or a deletion.
That is why adding one paragraph at the top does not mark the entire rest of the document as changed. The matching lines are still recognised as matching, just at different positions, which is what the two line-number columns show you.
A changed line appears as a removal followed by an addition. That is not a limitation to work around. It is the honest representation. “This line was edited” is a judgement about intent; “this line is gone and this one is new” is what actually happened to the text.
The algorithm builds a table the size of one text multiplied by the other, so the input is capped at 2,000 lines per side. Beyond that the memory cost in a browser tab stops being reasonable, and the tool says so instead of freezing.
A worked example
A supplier returns your contract “with a couple of small tweaks”. You want to know exactly what moved.
Press Load an example to see the shape of it. The result shows four kinds of row. The payment terms line appears twice — struck in red at 30 days, added in green at 14 days. That is the tweak: your cash sits with them for two weeks longer.
The termination and governing law lines are unmarked, so they are untouched. The confidentiality line is red-then-green, gaining “for three years”. And there is a green line with no red counterpart at the end: an entirely new arbitration clause that was not in your version at all.
That last one is the reason to run a diff rather than skim. A new final clause is easy to miss when you are reading for changes to text you remember — your eye is checking what you know, not looking for what you do not.
Press Changes only to hide the unchanged lines. On a long document that turns forty pages into a dozen rows. And the whole comparison ran in your browser: a contract under negotiation is precisely the kind of document that should not be pasted into a site that uploads it.
If the two versions came out of PDFs, extract the text from each first, then repair the line breaks — otherwise the diff will report differences that are only line-wrapping.
Questions
Are my documents uploaded?
No. The comparison runs entirely in your browser. This matters here more than almost anywhere on the site, since the usual reason to diff two texts is a contract or an agreement under negotiation.
Why does an edited line show as both removed and added?
Because that is what happened to the text. Calling it "modified" would be a guess about intent; showing the old and new lines separately is exact.
Does it compare word by word?
No, line by line. Word-level highlighting inside a changed line is a different algorithm and often produces noisier output on prose.
What do the two number columns mean?
The line number in the original and in the new version. They drift apart as lines are added or removed, which is how you see where the versions diverge.
Why is there a 2,000 line limit?
The algorithm builds a table proportional to one text multiplied by the other. Beyond a couple of thousand lines per side, the memory required in a browser tab becomes unreasonable.
Will it work with text copied from PDFs?
Yes, but repair the line breaks first. PDF text carries a hard break at every visual line, so two identical paragraphs wrapped differently will show as completely changed.
Does whitespace count as a difference?
Yes. A line with a trailing space differs from one without. Run both sides through the whitespace cleaner first if that noise gets in the way.
Can I export the comparison?
Not as a file. Select the result and copy it, or take a screenshot — the colouring is what makes it readable.
Related Text tools
Word Counter
Words, characters, reading time
open$termiva case --to titleCase Converter
UPPER, lower, Title, camelCase
open$termiva unwrap --keep-paragraphsRemove Line Breaks
Unwrap text into flowing lines
open$termiva dedupe --ignore-caseRemove Duplicate Lines
Keep one of each line
open