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.
Embed this calculator
Adjust the size if needed, then copy the code below into your page or blog. The calculator will load in an iframe and stay updated automatically.
Table of Contents
- Diff Checker
- Quick Answer
- Related Calculators
- How This Diff Checker Works
- How to Use the Diff Checker
- How the Texts Are Compared
- Key Terms
- Worked Example
- Real-Life Examples
- Line Diff vs Word Diff
- Diff Colors
- Tips for Comparing Text
- Common Mistakes to Avoid
- Frequently Asked Questions
- References & Sources
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
- Paste the original text into the first box.
- Paste the changed text into the second box.
- Choose whether to ignore extra spaces or letter case.
- Press Compare.
- 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
| Sign | Color | Meaning |
|---|---|---|
| + | Green | Line only in the changed text |
| − | Red | Line only in the original text |
| (none) | White | Line in both texts |
| Highlight | Dark green or red | Word 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
| Source | Used For | Link |
|---|---|---|
| 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 |
DigitalCalculators.net. (2026, November 15). Diff Checker. https://digitalcalculators.net/diff-checker/