Diff Checker

Diff Checker — Compare Two Texts

Paste the original text in the first box and the new version in the second. Removed lines turn red, added lines green, and inside a changed line the exact words that differ are highlighted. Nothing is uploaded: the comparison runs in your browser.

Lines in the original4
Lines in the changed text4

Calculated on your device · formulas checked against known results · How we test

How to compare two texts

  1. Paste the original — the older version — into the first box, and the changed version into the second. The comparison updates as you type.
  2. Read the colors: lines only in the original are red, lines only in the changed text are green, and inside a line that was edited the exact words that differ are highlighted more strongly. The summary counts removed and added lines.
  3. Switch the view between Side by side (the two versions next to each other, the default on wide screens) and Unified (one column with − and + lines, the default on phones).
  4. Ignore what doesn’t matter: tick the options to treat runs of spaces and tabs as one space, or to ignore upper and lower case.

How the comparison works

The diff checker first compares the texts line by line. It uses Eugene Myers’ difference algorithm (1986), the default in tools such as Git: it finds the smallest set of lines to remove and add that turns the original into the changed text, so unchanged lines line up even when lines were inserted or deleted in between. Long stretches without changes fold away, leaving three lines of context around each change; a button shows them again.

Next, within each block of changes, a removed line and an added line that share at least half their words are shown as one edited line, and the same algorithm runs again on their words, spaces and punctuation. That is how a single changed number in a long paragraph stands out. Lines with little in common are shown as a plain removal and addition, so you don’t get a confusing patchwork of highlights.

Worked example

The sample in the boxes is a short meeting note. The comparison finds four changes:

The summary reads 3 removed and 3 added: an edited line counts once on each side, the way most diff tools count, alongside the removed and the new line. The line “Please bring your laptop and the Q3 report.” is the same in both and stays white.

Tips for common comparisons

Limits

Your texts stay on your device

The comparison runs in your browser, so contracts, source code and other confidential text are never uploaded or logged. Nothing is saved either: reloading the page clears both boxes.

Frequently asked questions

Is the text I paste uploaded anywhere?

No. The diff checker runs entirely in your browser with JavaScript. Your texts aren’t sent to a server, aren’t stored, and are gone when you reload or close the page.

What do the red and green colors mean?

Red marks what is only in the original text (removed), green what is only in the changed text (added). Inside an edited line, the darker highlight marks the exact words or characters that differ.

Why does a moved paragraph appear as removed and added?

A line-by-line comparison finds the shortest list of removals and additions, and a move is exactly that: the paragraph disappears in one place and appears in another. Look for an identical red block and green block to spot moves.

What does “ignore differences in spaces and tabs” do?

It treats any run of spaces and tabs as a single space and ignores spaces at the start and end of each line, so re-indented code or doubled spaces don’t count as changes. Line breaks still count.

How is this different from git diff?

Both use the Myers algorithm to match lines. Git compares files in a repository and prints a unified diff for programs and terminals; this page compares any two texts you paste, adds word-level highlights and a side-by-side view, and needs nothing installed.

Embed this calculator on your website

Free for any website or blog. Paste this code where you want the calculator to appear:

All free calculator widgets

Last updated: October 15, 2026

Menu

Categories

Finance Calculators30 calculatorsBusiness & Shopping Calculators8 calculatorsHealth & Fitness Calculators12 calculatorsMath & School Calculators23 calculatorsDate & Time Calculators19 calculatorsHoliday Countdowns17 calculatorsEveryday Tools38 calculatorsMic, Camera & Sound Tools7 calculatorsImage & PDF Tools10 calculators

CalcWorthy

AboutContactPrivacy PolicyTerms of Use

Language

Language
EnglishEnglishالعربيةArabicবাংলাBanglaDeutschGermanEspañolSpanishفارسیPersianFrançaisFrenchעבריתHebrewहिन्दीHindiBahasa IndonesiaIndonesianItalianoItalian日本語Japanese한국어KoreanBahasa MelayuMalayNederlandsDutchPolskiPolishPortuguêsPortugueseРусскийRussianไทยThaiTürkçeTurkishУкраїнськаUkrainianاردوUrduTiếng ViệtVietnamese简体中文Simplified Chinese