Text Compare

Compare two texts line by line and word by word, with added and removed lines marked and a similarity percent.

Up to 5,000 lines. The text stays in your browser.

Up to 5,000 lines.

Similarity

76.9%

2 added, 1 removed

Lines added (+)
2
Lines removed (-)
1
Lines unchanged
5
Words added in changed lines
6
Words removed in changed lines
2
  Dear team,
- The meeting is on Monday at 10:00.
+ The meeting is on Tuesday at 10:30.
  Please bring your laptop.
+ Please bring your notes.
  Lunch is provided.
  Thanks,
  Sam

Compared with the first text, the second has 2 lines added and 1 lines removed, and 5 lines stay the same. Lines starting with "- " are only in the first text and lines starting with "+ " are only in the second.

Add this calculator to your website

Free to use on any site or blog. Paste this code where you want the calculator to appear. It stays up to date, needs no account, and keeps your visitors' numbers in their own browser.

Preview

Word changes in edited lines (line number in the second text)

Word changes in edited lines (line number in the second text)
LineWords removedWords added
2Monday 10:00.Tuesday 10:30.

How it works

Put the original text in the first box and the changed text in the second. The tool splits both into lines and finds the longest common subsequence of lines, the longest run of lines that appear in both texts in the same order. Lines in that run are unchanged. Everything else is a difference: a line only in the first text is marked "- " (removed) and a line only in the second is marked "+ " (added). Unchanged lines start with two spaces.

For the word level, a removed line next to an added line is treated as an edit of one line. The words of the two lines are compared the same way, and the table lists the words taken out and the words put in. Lines with no partner count all their words as removed or added.

Similarity is the share of lines the two texts have in common: 2 × unchanged lines ÷ (lines in the first text + lines in the second text). Two identical texts give 100% and two texts with nothing in common give 0%. You can ignore upper and lower case, and ignore extra spaces, which trims each line and treats several spaces as one.

Check it by hand: compare the lines a, b, c with a, c, d. Lines a and c are in both texts, so 2 lines are unchanged. Line b is only in the first text (removed) and line d is only in the second (added). Similarity is 2 × 2 ÷ (3 + 3) = 0.667, which is 66.7%.

Similarity (%) = 2 × unchanged lines ÷ (lines in text 1 + lines in text 2) × 100

Worked example

The sample has a 6 line notice and a 7 line edited version. 5 lines are unchanged, 1 line was removed and 2 lines were added, which gives a similarity of 2 × 5 ÷ (6 + 7) = 76.9%. The word table shows that Monday became Tuesday and 10:00. became 10:30. in line 2, 2 words out and 2 in, and the new line "Please bring your notes." adds 4 words, 6 words added in all.

Good to know

  • Each text can have up to 5,000 lines. The comparison builds a table the size of the two line counts multiplied together, so larger texts are refused with a message. Compare long documents in parts.
  • The comparison is by whole line. If a paragraph is one very long line and one word changed, the whole line shows as changed, and the word table shows which word. Put each sentence on its own line to get a finer comparison.
  • When several equally good matches exist, the tool picks one, so another diff program can show the same changes in a different way.
  • It compares text only. Formatting in Word or PDF files is not read, so copy the text out first.

Questions people ask

How do I find the difference between two texts?

Paste the first text into the first box and the second into the other. Lines marked "- " are only in the first, lines marked "+ " are only in the second, and the number of changes and a similarity percent are shown.

What does a diff checker do?

It lines up two versions of a text, finds what stayed the same, and shows what was added and removed. Programmers use diffs to review code changes, but they work for any text, such as contracts, essays and lists.

How is the similarity percent worked out?

It is twice the number of unchanged lines divided by the total lines in both texts. For 5 unchanged lines in texts of 6 and 7 lines, that is 10 ÷ 13, about 77%.

Can it ignore capital letters or spaces?

Yes. Set "Ignore upper and lower case" or "Ignore extra spaces" to yes and lines that differ only in that way are counted as unchanged.

Can I compare two files?

Open each file, copy its text and paste it into the boxes. The tool compares text, not files, and nothing is uploaded.

Why does a whole paragraph show as changed when I changed one word?

The comparison works by line. A paragraph typed as one long line is one line, so it is marked as removed and added. The word table below the result shows the exact word that changed.

How is the similarity percent worked out?

It is 2 × the unchanged lines ÷ (the lines in the first text + the lines in the second). Two texts of 3 lines that share 2 lines score 2 × 2 ÷ 6 = 66.7%.

Part of the guide: Text tools: word counter, case converter, duplicate lines and more

Formulas and text last checked on 14 October 2026. Everything is calculated in your browser, so nothing you enter is sent or stored. Spotted a mistake? Tell us and we will fix it.