Word changes in edited lines (line number in the second text)
| Line | Words removed | Words added |
|---|---|---|
| 2 | Monday 10:00. | Tuesday 10:30. |
Compare two texts line by line and word by word, with added and removed lines marked and a similarity percent.
| Line | Words removed | Words added |
|---|---|---|
| 2 | Monday 10:00. | Tuesday 10:30. |
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
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.
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.
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.
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%.
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.
Open each file, copy its text and paste it into the boxes. The tool compares text, not files, and nothing is uploaded.
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.
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