Text Diff Checker
Compare two texts and highlight every added and removed line, word or character
Compare two versions of text by line, word or character, with additions and deletions highlighted, a similarity score, and options to ignore case and spacing.
Everyday UseUpdated October 21, 2026Checked against 6 reference values
Similarity
57%
2 lines added, 1 removed
Chart data as a table
| Unchanged | Added | Removed | |
|---|---|---|---|
| Comparison | 2 | 2 | 1 |
- Added lines
- 2
- Removed lines
- 1
- Unchanged lines
- 2
Differences
Green marks text only in the changed version; red with a line through marks text only in the original.
What this tool does
Paste two versions of a text and this tool highlights exactly what changed: lines, words or characters that were added, removed or kept. It reports how similar the two versions are and lets you ignore differences in capitalization or spacing. Use line mode for code, lists and configuration files, word mode for documents and emails, and character mode to find a single changed letter or digit.
The comparison runs in your browser, so contracts, drafts and code never leave your device.
How the comparison works
Similarity = 2 × matching units ÷ (units in original + units in changed text)
The tool finds the longest common subsequence, the largest set of lines, words or characters that appear in both texts in the same order, using dynamic programming. Everything outside that common thread is marked as removed from the original or added in the changed version. This is the same idea behind the diff utility created for Unix in the 1970s and the comparison views in version control systems such as Git.
Examples
Line mode. Comparing a shopping list of apples, bananas and cherries with apples, blueberries, cherries and dates finds 1 removed line and 2 added lines, with 57% similarity.
Word mode. "The meeting is on Tuesday at 3 pm" versus "Thursday at 4 pm" highlights just the day and the time, 2 words removed and 2 added.
Common uses
- Checking what an editor or colleague changed in a document or contract.
- Comparing two versions of code, configuration or data files without setting up version control.
- Finding the difference between two similar lists, such as attendee or product lists.
- Proofreading a revised draft against the original version.
- Spotting a changed digit in long numbers, account IDs, serial numbers or keys.
Choosing options
Ignore spacing when text has been reformatted, for example re-indented code or paragraphs with extra spaces, so only real changes show. Ignore case when capitalization does not matter, such as comparing email addresses or tags. Word mode treats punctuation attached to a word as part of it, so "day." and "day" count as different words; switch to character mode if you need to see punctuation changes precisely.
Reviewing changes efficiently
When checking a long revised document, start in line mode to see which paragraphs changed at all, then switch to word mode to read the exact edits within them. Turn on Ignore spacing first, because reflowed text and trailing spaces can make almost every line look different. For contracts and policies, pay special attention to small words such as not, may, must and shall, dates and numbers, since a single changed word can reverse the meaning of a clause. Copy the result to share a plain-text summary of the changes with others, with additions and deletions marked.
Limits
To keep the page fast, very long texts compared word by word or character by character are refused; compare them line by line, or split them into sections. A moved paragraph shows as removed in one place and added in another, because a diff records differences in order rather than moves. For formatted documents such as Word files, compare the plain text, since formatting changes are not visible here.
Text Diff Checker: common questions
How do I compare two texts?
Paste the original on the left and the changed version on the right. Differences are highlighted below, with additions in green and deletions in red.
Should I compare by lines or words?
Lines suit code, lists and data; words suit prose such as documents and emails; characters find tiny changes like a single digit.
What does the similarity percentage mean?
Twice the number of matching units divided by the total units in both texts. 100% means identical and 0% means nothing in common.
Can I ignore formatting differences?
You can ignore capitalization and spacing. Formatting such as bold or fonts is not part of plain text, so it is not compared.
Is my text uploaded?
No. The comparison runs in your browser, and the texts are only saved on this device.
Sources
- Hunt, J. W. and McIlroy, M. D. (1976). An Algorithm for Differential File Comparison. Bell Laboratories Computing Science Technical Report 41
- Myers, E. W. (1986). An O(ND) difference algorithm and its variations. Algorithmica 1, 251-266
Related calculators
- Remove Line Breaks ToolRemove unwanted line breaks from text copied from PDFs, emails or documents, keep paragraphs or join everything, rejoin hyphenated words and collapse extra spaces.
- Alphabetize List ToolAlphabetize a list A to Z or Z to A with natural number order, remove duplicates, ignore leading articles, sort by length or shuffle, with lines, commas or spaces.
- Word Count CalculatorCount words, characters with and without spaces, sentences and paragraphs as you type, with reading time, keyword density, common limits and a word goal.
- Online NotepadWrite plain-text notes that save automatically in your browser, with live word, character, sentence and paragraph counts, reading time, copy and download as a text file.
- Text Case ConverterConvert text to sentence case, AP-style title case, uppercase, lowercase, camelCase, PascalCase, snake_case, kebab-case and more, with every style shown at once.