Text Compare
Compare two texts and see exactly what changed. Paste the original and the changed version: removed text is highlighted in red, added text in green, word by word, line by line or character by character. Ignore capitalization or spacing, and see how similar the two texts are.
- Words, lines or characters
- Side by side or in one text
- Stays on your device
Differences
Paste two texts to see what changed.
- Same
- –
- Changes
- –
- Words removed
- –
- Words added
- –
- Characters removed
- –
- Characters added
- –
How to compare two texts
Finding the differences between two texts takes three steps with this text compare tool.
-
Paste the original text
Put the older version in Original text.
-
Paste the changed text
Put the newer version in Changed text. The differences appear below as you type.
-
Review the changes
Removed text is red and crossed out, added text is green. Use Previous change and Next change to step through them, or show the changes In one text.
Comparing the sample texts word by word finds 4 changes: Monday became Tuesday, 3 became 4, “and laptop” was added and a new last line was added. 81% of the text is the same.
Text compare features
An online diff checker and text difference checker that shows changes the way you read them.
-
±
Added and removed
Removed text in red, added text in green, in the original and the changed text.
-
3
Three levels
Compare word by word, line by line or character by character.
-
Aa
Ignore case and spacing
Skip changes that are only capitals, or only spaces and line breaks.
-
%
How similar
The share of text that is the same, plus words and characters added and removed.
Compare by words, lines or characters
The same two sample texts compared three ways:
| Compare by | Changes | Same | Best for |
|---|---|---|---|
| Words | 4 | 81% | Essays, articles, contracts and emails. |
| Lines | 2 | 28% | Lists, code, data and anything with one item per line. |
| Characters | 4 | 84% | Typos, spelling, numbers and punctuation. |
A line that changed by one word counts as a whole changed line in line mode, which is why its “same” share is much lower.
How the text comparison works
The tool looks for the fewest changes that turn the original into the changed text, using the difference algorithm Eugene Myers published in 1986, which is the basis of the diff tools programmers use. Everything that isn’t part of those changes is shown as unchanged.
It compares the lines first, then looks inside each changed block word by word or character by character. That keeps long documents fast and makes changes easy to read: a sentence with one new word shows just that word in green, not the whole sentence. When two blocks are too different to compare in detail, they are shown as removed and added in full, and the tool tells you.
Same is the share of characters in both texts that didn’t change. Changes counts each place where something was removed, added or replaced.
Ignore capitalization or spacing
- Ignore capitalization treats Hello and hello as the same, so a heading changed to title case doesn’t fill the result with changes.
- Ignore spaces and line breaks treats two spaces like one and skips changes that are only spacing, such as text that was re-wrapped onto different lines.
Both only change how the texts are compared; the texts themselves stay as you pasted them.
Compare documents in Word and Google Docs
- Microsoft Word: on the Review tab, choose Compare › Compare Documents, then pick the original and the revised document. Word shows the differences as tracked changes in a new document.
- Google Docs: open the first document and choose Tools › Compare documents, then pick the second one. Docs creates a new document with the differences as suggested edits.
Both need the two versions saved as files. To compare text from anywhere, such as an email, a web page or a PDF, paste both versions here. To count the words in each version, use the word counter.
What to compare
- Edited drafts: see what an editor or a colleague changed in your essay, article or report.
- Contracts and policies: spot a changed date, amount or clause between two versions.
- Copied text: check that a quote, a translation or a legal notice was pasted correctly.
- Lists and data: compare two lists line by line to see what was added or removed. To remove the duplicates from a list first, use Remove Duplicate Lines.
- Code and configuration: compare two versions of a file line by line.
Text compare FAQ
How do I compare two texts?
Paste the original in Original text and the new version in Changed text. The differences appear below straight away.
What do the colors mean?
Red, crossed-out text was removed from the original. Green text was added in the changed version. Everything else is the same in both.
Should I compare by words, lines or characters?
Words for prose, lines for lists and code, characters for small edits like spelling, numbers and punctuation.
Can I ignore capitalization and spaces?
Yes. Tick Ignore capitalization or Ignore spaces and line breaks; changes that are only capitals or only spacing are then not shown.
How is the similarity calculated?
Same is the share of characters in both texts that are part of the unchanged text. Two identical texts are 100% the same.
Can I see the changes in one text?
Yes. Choose In one text to see removed and added text together in a single view. Phones start in this view.
Is there a length limit?
No fixed limit. Long documents are compared in your browser; very different long texts are shown as removed and added blocks.
Is my text uploaded?
No. Both texts are compared in your browser and nothing is sent or stored.
Sources and references
- An O(ND) Difference Algorithm and Its Variations (Algorithmica, 1986), Eugene W. Myers
- Compare and merge two versions of a document, Microsoft Support
- See changes in Google Docs over time with Compare Documents, Google Workspace Updates
More text editing tools
- A→B Find and Replace Find words or phrases and replace them all, with whole-word and regex options. Open tool
- ≠ Remove Duplicate Lines Remove duplicate lines from a list and keep its order. Open tool
- Frequency Word Frequency Counter Rank every word by how often it appears, with counts and density. Open tool
- Aa Case Converter Convert text to uppercase, lowercase, sentence case, title case and more. Open tool