Skip to content
YouNeed Tools
Free VPN

Text Compare

Paste the original on the left and the new version on the right to see exactly what changed, line by line and word by word.

View

2 changed, 1 added and 1 removed lines; 5 the same.

Differences side by side
1Dear team,1Dear team,
22
3Our meeting is on Tuesday at 10 am in room 4.3Our meeting is on Wednesday at 10 am in room 4.
4Please bring the sales figures for October.4Please bring the sales figures for October and November.
5Lunch will be provided.
65
7Thanks,6Thanks,
8Sam7Sam
8Office manager

Compared on your device. Your text isn’t sent anywhere.

Worked example

A shopping list changed from “Milk, Eggs, Bread (white), Apples” to “Milk, Bread (wholemeal), Apples, Coffee”, one item per line. The comparison finds 2 lines the same, 1 changed, 1 added and 1 removed: “Eggs” paired with the new bread line shows as a change, “Bread (white)” as removed, and “Coffee” as added. The plain-text report you can copy reads:

  Milk
- Eggs
+ Bread (wholemeal)
- Bread (white)
  Apples
+ Coffee

Lines starting with − were in the original, lines with + are in the new version, and indented lines are unchanged.

Reading the results

  • Changed: a line removed and a line added at the same place. The words that differ are highlighted, so a single edited word in a long paragraph stands out.
  • Added or removed: lines with no partner on the other side.
  • Moved text appears as removed in one place and added in another, as in every line-based comparison.

Tips for cleaner comparisons

Paragraphs are compared as single lines, so one change marks a whole paragraph; the word highlights then show exactly what moved. If you are comparing text from two PDFs or web pages where line breaks fall in different places, join each paragraph onto one line first, or tick “Ignore extra spaces”. For code, keep the original indentation and leave the option off, because spaces can matter.

Who uses a diff checker

Writers check what an editor changed in a draft; students compare a rewrite with the first version; lawyers and landlords spot edits in a contract before signing; developers compare configuration files and code snippets; translators check that a new version of a source text only changed where expected. In each case, seeing the exact words that changed is faster and safer than reading both versions side by side yourself.

How the comparison is calculated

The tool treats each text as a list of lines and looks for the longest run of lines the two have in common, in order. Everything outside that common run is either a removal or an addition. Myers’ algorithm finds this with the fewest possible edits, working along diagonals of an edit graph and stopping as soon as the two texts meet. Lines that sit opposite each other are then split into words and spaces and compared the same way, which is how a single changed word in a long line is highlighted. Because the method always finds the smallest set of changes, two runs on the same texts give the same answer every time.

Related tools

Sources

Checked on November 26, 2026:

Frequently asked questions

How does the text compare tool work?
It lines the two texts up line by line and finds the smallest set of lines to remove and add to turn the first into the second, using Myers’ difference algorithm (the method behind most diff tools). Where a removed line and an added line sit opposite each other, it compares them word by word and highlights the words that changed.
What do the colours mean?
Red is text in the original that isn’t in the changed version; green is text that was added. Lines with no colour are the same in both. In the side-by-side view, the original is on the left with its line numbers and the changed text on the right.
Can it ignore capital letters and spaces?
Yes. “Ignore capitals” treats Hello and hello as the same, and “Ignore extra spaces” treats lines that differ only in spaces or tabs as the same. Useful for text copied from PDFs or emails.
Can I compare Word documents or PDFs?
Paste the text from each document into the two boxes. You can also open plain text files such as .txt, .md, .csv, .json or code. For two PDFs with layout and pictures, use the Compare PDF tool.
Is there a size limit?
Each box takes up to 300,000 characters, roughly a 50,000-word book. Very different long texts take longer; for huge files with thousands of changes, the comparison switches to showing the remaining part as replaced.
Is my text uploaded?
No. The comparison runs on your device, so you can compare contracts, essays or code safely.

Last updated: 2026-11-26