Skip to main content

DigitalCalculators.net

Diff Checker

Last updated By the DigitalCalculators.net team Free, no sign-up

Paste two versions of a text to see what changed. Added lines are green, removed lines are red, and changed words are highlighted.

Results

ItemValue
Lines are matched with a longest common subsequence method, the same idea behind the diff tools programmers use. Changed lines that pair up are shown with the different words highlighted. Your text stays in your browser.

Quick Answer

Paste the original text in the first box and the new version in the second, then press Compare. Lines only in the new text are green with a +, lines only in the original are red with a −, and in lines that changed, the exact words that differ are highlighted. The table counts added, removed and unchanged lines.

Last updated: 15 November 2026 ·How we calculate this: how the texts are compared

How This Diff Checker Works

A diff checker compares two versions of a text and shows exactly what was added, removed or changed. Paste an old and a new version of a document, a list, code or a contract clause, and the differences are marked line by line and word by word.

Features:

  • Line changes: green for added, red for removed.
  • Word changes: the exact words that changed are highlighted.
  • Options: ignore extra spaces or upper and lower case.
  • Summary: lines added, removed and unchanged, plus a similarity score.

How to Use the Diff Checker

  1. Paste the original text into the first box.
  2. Paste the changed text into the second box.
  3. Choose whether to ignore extra spaces or letter case.
  4. Press Compare.
  5. Read the colored lines and the summary table.

How the Texts Are Compared

  • Longest common subsequence: the tool finds the longest list of lines that appear in both texts in the same order. Those lines are unchanged.
  • Removed lines: lines in the original that are not part of that common list.
  • Added lines: lines in the new text that are not part of it.
  • Changed lines: a removed line followed by an added line is compared word by word in the same way.
  • Similarity: unchanged lines ÷ the longer text's line count × 100.

Key Terms

  • Diff: a list of differences between two texts.
  • Longest common subsequence: the longest sequence of items found in both texts in the same order.
  • Similarity: the share of lines that did not change.

Worked Example

Original list: Milk, Eggs, Bread, Apples, Coffee. New list: Milk, Eggs, Butter, Bread, Coffee beans.

  • Unchanged: Milk, Eggs, Bread (3 lines)
  • Added: Butter
  • Changed: Coffee became Coffee beans, with beans highlighted
  • Removed: Apples
  • Similarity: 3 ÷ 5 × 100 = 60%

Real-Life Examples

  • Documents: see what an editor changed in a 40-line draft.
  • Lists: compare two guest lists to find who was added or removed.
  • Code: check what changed between two versions of a config file.
  • Contracts: spot a changed number, such as 30 days becoming 14 days.

Line Diff vs Word Diff

  • Line diff: shows which whole lines were added or removed; clear for lists and code.
  • Word diff: shows the exact words that changed inside a line; clear for prose.
  • This tool: does both, with word highlights inside changed lines.

Diff Colors

SignColorMeaning
+GreenLine only in the changed text
−RedLine only in the original text
(none)WhiteLine in both texts
HighlightDark green or redWord that changed inside a line

Tips for Comparing Text

  • Ignore spaces: when only spacing or indentation changed, choose Ignore extra spaces.
  • Ignore case: useful for lists where capital letters do not matter.
  • One item per line: lists compare best with one item on each line.
  • Long paragraphs: a whole paragraph on one line shows as one changed line; the word highlights show what changed inside it.

Common Mistakes to Avoid

  • Swapping the boxes. Put the older version first, or added and removed are reversed.
  • Hidden spaces. Extra spaces at line ends count as changes unless you ignore them.
  • Different line breaks. Text copied from PDFs may break lines differently.
  • Very long single lines. Split long paragraphs into lines for a clearer view.
  • Trusting a quick look. Read the summary counts to be sure nothing was missed.

Frequently Asked Questions

Paste the original into the first box and the new version into the second, then press Compare.

Green lines were added in the new text; red lines were removed from the original.

Yes. When a line changes, the words that differ are highlighted.

Yes. Choose Ignore extra spaces.

Yes. Choose Ignore upper and lower case.

Up to 3,000 lines each.

No. The comparison runs in your browser.

Yes. It works with any plain text, including code and config files.

The share of lines that are the same in both texts, out of the longer text's lines.

Copy the text out of the file and paste it into the boxes. Formatting such as bold or fonts is not compared, only the words.

The tool compares line by line, and a paragraph without line breaks counts as one line. Look at the highlighted words inside it to see exactly what changed, or split the paragraph into sentences on separate lines.

Yes. The first box is treated as the original and the second as the new version. If you swap them, added lines show as removed and removed lines show as added.

It uses the same basic idea of matching the longest common run of lines, so results look similar to programmers' diff tools, shown here with colors instead of plus and minus symbols only.

References & Sources

SourceUsed ForLink
Hunt and McIlroy (1976), An Algorithm for Differential File Comparison, Bell Labs CSTR 41 The line-matching idea used by diff tools. https://www.cs.dartmouth.edu/~doug/diff.pdf
Wikipedia, Longest common subsequence The method used to match lines and words. https://en.wikipedia.org/wiki/Longest_common_subsequence
Cite or share this calculator

DigitalCalculators.net. (2026, November 15). Diff Checker. https://digitalcalculators.net/diff-checker/