Free tool Diff checker: compare two texts online
Paste the old and new version of a landing page, a robots.txt file or a tracking config. Added lines turn green, removed lines turn red, and the exact words that changed inside a line are highlighted. Compare by line, word or character, ignore whitespace and case, and download the result as a standard .diff.
- Side by side or unified
- Fast on 10,000+ lines
- Runs in your browser
Compare two texts
Original on the left, changed version on the right. Results update as you type. Load an example or swap the two sides with the buttons.
Added
2
In the current unit: lines, words or characters.
Removed
2
In the original but not in the changed text.
Unchanged
2
Identical on both sides (after ignoring whitespace or case, if ticked).
Similarity
50.0%
2 × unchanged ÷ (original + changed), the same ratio as Python’s difflib.
Differences
RemovedAdded
| 1 | Black Friday sale starts Friday at 9 AM | 1 | Black Friday sale starts Friday at 9 AM |
| 2 | Save | 2 | Save 25% on all annual plans |
| 3 | Free shipping on orders over $ | 3 | Free shipping on orders over $35, excluding Alaska and Hawaii |
| 4 | Live chat support: 9 AM to 6 PM | 4 | Live chat support: 9 AM to 6 PM |
--- a
+++ b
@@ -1,4 +1,4 @@
Black Friday sale starts Friday at 9 AM
-Save 20% on all annual plans
-Free shipping on orders over $50
+Save 25% on all annual plans
+Free shipping on orders over $35, excluding Alaska and Hawaii
Live chat support: 9 AM to 6 PM
The same format as diff -u and git diff, ready to save or paste into a ticket.
Version v1.0Updated Update history
Red was removed, green was added
Side by side puts the original on the left and the changed text on the right, with edited lines on the same row. Unified view stacks removed and added lines, which works better on narrow screens.
Line background
A light red line no longer exists in the changed text; a light green line is new. When only a few words in a line changed, the old and new lines are paired on one row.
Word highlights
Paired lines are compared again word by word and the words that actually changed get a darker highlight: in the example, “20%” → “25%” and “$50” → “$35”.
Word and character modes
Use word mode for articles and copy: English is split into words, Chinese into characters, punctuation separately. Use character mode to check contract clauses, IDs or keys character by character.
Similarity
The share of text that is the same on both sides; 100% means identical. It is a quick sense of how big an edit is, not plagiarism detection: moving a paragraph counts as a removal plus an addition.
The comparison runs only in your browser, so it is fine for internal copy and config files.
See what changed in three steps
Common uses: robots.txt before and after a redesign, two versions of landing page copy, a tracking or API config.
-
1
Paste both versions
Old on the left, new on the right. Pasted them the wrong way round? Click “Swap sides”.
-
2
Choose how to compare
Lines for code, configs and lists; words for prose; characters to check every character. Tick “Ignore whitespace” when indentation changes don’t matter.
-
3
Read, then export if needed
With many changes keep “Only show changes in context” on. To keep a record or share it, download the .diff patch; it applies with
git applyorpatch.
The fewest edits that turn old into new
A diff looks for the longest common subsequence: what appears on both sides in the same order is kept, the rest is marked as removed or added.
- Line mode uses the Myers difference algorithm (E. W. Myers, 1986; also git diff’s default), after trimming the identical start and end
- When two texts are very different, it switches to a patience-style approach: lines that occur exactly once on each side become anchors, and the gaps are compared separately. That keeps 10,000+ line inputs instant
- Word and character modes align lines first and only split changed lines further, so long texts don’t collapse into “everything removed, everything added”
- “Ignore whitespace” and “Ignore case” only affect matching; the text shown is your original, and unchanged lines show the new version
| Unit | How text is split | Best for |
|---|---|---|
| Line | Each line break starts a new line | robots.txt, sitemaps, configs, code, keyword lists |
| Word | Words and numbers as units; CJK per character; punctuation and spaces separate | Articles, ad copy, product descriptions |
| Character | Each visible character (emoji kept whole) | Contract clauses, IDs, keys |
What changed in the sale copy
The default example: two versions of a Black Friday announcement, compared by line.
| Line | Original | Changed | Result |
|---|---|---|---|
| 1 | Black Friday sale starts Friday at 9 AM | (same) | Unchanged |
| 2 | Save 20% on all annual plans | Save 25% on all annual plans | Changed: 20% → 25% |
| 3 | Free shipping on orders over $50 | Free shipping on orders over $35, excluding Alaska and Hawaii | Changed: $50 → $35, added “, excluding Alaska and Hawaii” |
| 4 | Live chat support: 9 AM to 6 PM | (same) | Unchanged |
By line: 2 added, 2 removed, 2 unchanged; similarity = 2 × 2 ÷ (4 + 4) = 50%. A changed line counts as one removal plus one addition, which is why a two-character edit still shows as “−1 +1”.
When the diff “looks wrong”
Usually the algorithm is fine and the two inputs differ in formatting.
Different whitespace
Windows line endings (CRLF) are normalized already. Trailing spaces and tabs versus spaces still count as changes; tick “Ignore whitespace changes”.
Sides swapped
Every addition shows as a removal and the other way round. Click “Swap sides” instead of pasting again.
Moved paragraphs
A diff compares in order, so a paragraph that moved shows as removed in one place and added in another. That is expected, not a missed match.
Minified one-line files
Minified JSON or JS is one line, so line mode can only say “this line changed”. Pretty-print it first with the JSON formatter, then compare by line.
After a change, check the effect in your data
A diff tells you what changed. Analytics tells you what happened next.
Bots and AI crawlers
After editing robots.txt, compare against what GPTBot, ClaudeBot, Googlebot and others actually fetched; robots.txt itself isn’t enforced.
Learn moreSearch performance
Compare clicks and impressions from Search Console before and after you rewrote titles and descriptions.
Learn moreData quality
After a tracking or config change, unexpected event names, missing properties and wrong value types are flagged.
Learn moreDiff checker FAQ
Still have a question?
Chat with the team behind TapCub — we usually reply within a few hours on business days.
How do I compare two texts online?
Paste the original on the left and the changed version on the right. The result appears immediately: light red lines were removed, light green lines were added, and changed words inside a line are highlighted. No button, no sign-up.
Is my text uploaded?
No. The comparison runs in your browser; neither text goes into the URL or to TapCub, and it is gone when you close the page.
What is the difference between line, word and character mode?
Line mode suits code, configs and lists: any change marks the whole line. Word mode suits prose: English by word, Chinese by character. Character mode finds every single character that differs, for IDs or contract clauses.
How large a text can it handle?
Inputs of 10,000+ lines compare in a moment: the identical start and end are trimmed first and very different texts are split on unique lines. The page draws up to 3,000 rows; download the .diff for the complete result.
How do I ignore whitespace or case?
Tick “Ignore whitespace changes” to ignore leading/trailing spaces and treat runs of spaces as one, and “Ignore case” to treat A and a as equal. Both only affect matching; the text shown is unchanged.
What can I do with the .diff file?
It is a unified diff, the format of diff -u and git diff. Paste it into a ticket or code review, or apply it to the original file with patch or git apply.
Can it compare Word or PDF files?
It compares plain text. Copy the text out of the document and paste it in; formatting such as fonts and colors is not compared.
Update history
New features, fixes and data refreshes for this tool, newest first.
-
· v1.0
LaunchedFirst release.
Missing something or found an error? Tell us — requests that come up often go into the next update. All tool updates
Changed robots.txt? See if crawlers comply
With TapCub installed, search engines, AI crawlers and real visitors are reported separately, so rule changes show up in the data.