TapCub is live — analytics, insights and live chat, free on one platform

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
Diff checker

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

1Black Friday sale starts Friday at 9 AM1Black Friday sale starts Friday at 9 AM
2Save 20% on all annual plans2Save 25% on all annual plans
3Free shipping on orders over $503Free shipping on orders over $35, excluding Alaska and Hawaii
4Live chat support: 9 AM to 6 PM4Live chat support: 9 AM to 6 PM
Unified diff (.diff)
--- 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.

Runs entirely in your browser. Nothing you type here is uploaded or stored by TapCub.

Version v1.0Updated Update history

Reading the result

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.

How to use it

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. 1

    Paste both versions

    Old on the left, new on the right. Pasted them the wrong way round? Click “Swap sides”.

  2. 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. 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 apply or patch.

How the comparison works

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
Three units of comparison
UnitHow text is splitBest for
LineEach line break starts a new linerobots.txt, sitemaps, configs, code, keyword lists
WordWords and numbers as units; CJK per character; punctuation and spaces separateArticles, ad copy, product descriptions
CharacterEach visible character (emoji kept whole)Contract clauses, IDs, keys
Worked example

What changed in the sale copy

The default example: two versions of a Black Friday announcement, compared by line.

Result for the default example
LineOriginalChangedResult
1Black Friday sale starts Friday at 9 AM(same)Unchanged
2Save 20% on all annual plansSave 25% on all annual plansChanged: 20% → 25%
3Free shipping on orders over $50Free shipping on orders over $35, excluding Alaska and HawaiiChanged: $50 → $35, added “, excluding Alaska and Hawaii”
4Live 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”.

Common mistakes

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.

FAQ

Diff 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.

Changelog

Update history

New features, fixes and data refreshes for this tool, newest first.

  1. · 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

See your data clearly. Find your growth.

Every click, backed by data. Install one line of code and see your first numbers in a minute.

No credit card · Free plans for analytics and chat · Cookieless analytics