Text Compare

Compare two versions of a text and see every added, removed and changed line, with changed words highlighted.

3
Lines added
2
Lines removed
3
Unchanged
4
Words added
1
Words removed
11Dear team,
2Removed: The meeting is on Monday at 10am.
3Removed: Please bring the quarterly report.
2Added: The meeting is on Tuesday at 10am.
3Added: Please bring the quarterly report and your laptop.
4Added: Lunch will be provided.
45Thanks,
56Sam

What the comparison shows

Paste two versions of a text and the tool lists every line, marking the ones that were removed from the original and the ones that were added in the changed version. Inside a changed line, the exact words that differ are highlighted, so a one-word edit in a long paragraph is easy to spot.

This is the same kind of comparison developers use to review code changes, usually called a diff. It works just as well for contracts, essays, configuration files, product descriptions or any two drafts where you need to know exactly what changed.

Key takeaways

  • A minus on red means the line exists only in the original; a plus on green means it exists only in the changed text.
  • A changed line appears twice: the old version removed, the new version added.
  • Word highlighting shows which words inside a changed line are different.
  • Ignore case and Ignore whitespace hide differences you do not care about.
  • Both texts stay in your browser; nothing is uploaded.

A worked example

The tool opens with two versions of a short note. The original reads: Dear team, / The meeting is on Monday at 10am. / Please bring the quarterly report. / Thanks, / Sam. In the changed version, Monday became Tuesday, the third line gained and your laptop, and a new line was added. This is the real output:

OldNewChangeLine
11Dear team,
2-The meeting is on Monday at 10am.
3-Please bring the quarterly report.
2+The meeting is on Tuesday at 10am.
3+Please bring the quarterly report and your laptop.
4+Lunch will be provided.
45Thanks,
56Sam

Totals: 3 lines added, 2 removed, 3 unchanged; 4 words added, 1 word removed. A slash in the text above marks a line break.

The two number columns give each line's position in the original and in the changed text, so you can find it in either document. Unchanged lines have both numbers; removed lines only an old number; added lines only a new one. The word counts cover changed lines that were paired with a line on the other side: Tuesday plus and your laptop make four words added, and Monday is the one word removed. The brand-new line counts as an added line, not as added words.

How the differences are found

The tool uses Eugene Myers' difference algorithm, published in 1986 and still the basis of the diff in Git and most other version control systems. It finds the shortest edit script: the smallest number of whole lines that must be removed from the original and added to produce the changed text. Everything else is reported as unchanged.

Shortest is not always the same as most natural. If a line moves, a diff cannot say so; it reports the line as removed from its old place and added at its new one. Moving the first line of a, b, c, d to the end gives one removal and one addition, with b, c, d unchanged. When a paragraph is rewritten and reordered, expect a block of removals followed by a block of additions.

Word highlighting runs the same algorithm a second time inside each changed line, treating words, spaces and punctuation marks as the units. Within a block of changes, the first removed line is paired with the first added line, the second with the second, and so on. Pairs that are genuinely related produce precise highlights; unrelated pairs simply show most of the line as changed.

Line breaks matter. The comparison works line by line, so re-wrapping a paragraph at a different width makes every line look changed even if no word was edited. Compare text that has the same line structure, or put each paragraph on one line first.

Ignoring differences that do not matter

OriginalChangedDefaultWith option
Hello World / second linehello world / second line1 added, 1 removedIgnore case: identical
total = a + b /   return totaltotal = a  +  b / return total2 added, 2 removedIgnore whitespace: identical
one / two (Windows line breaks)one / two (Unix line breaks)identical-

A slash marks a line break. Results from the tool's own comparison function.

Ignore case treats capital and lowercase letters as equal. Ignore whitespace treats any run of spaces or tabs as a single space and ignores spaces at the start and end of a line, which hides indentation and alignment changes. Neither option changes what is displayed: where lines are considered equal, the changed version is shown.

Windows (CRLF) and Unix (LF) line endings are always treated as the same, because they are invisible and almost never the change you are looking for. If one text ends with a line break and the other does not, the tool says so in a note rather than marking a line as changed.

Hide unchanged lines collapses long unchanged stretches, keeping three lines of context on each side of every change, the same amount Git shows by default. A marker shows how many lines were hidden.

Where a text comparison helps

  • Contracts and agreements: check what the other side changed in a returned draft, especially when tracked changes were not used. For anything you sign, have the final version reviewed properly; a diff shows changes, not their legal effect.
  • Essays and articles: see what an editor altered, or compare your draft against an earlier version.
  • Configuration and code: compare two versions of a settings file to find the line that broke something.
  • Data exports: compare two lists or CSV exports line by line to find new and removed rows. Sorting both lists first gives a cleaner result.
  • Copy checks: confirm that text pasted into a website or document matches the approved version exactly.

The comparison is efficient: two texts of several thousand lines are compared in a fraction of a second, and the time grows with the number of differences rather than the square of the length.

Everything happens in your browser. Both texts are compared on your own device. Nothing is uploaded, stored or logged, so confidential contracts, code and private documents can be compared safely. Closing the tab discards them.

Frequently Asked Questions

How do I compare two texts for differences?

Paste the original into the left box and the changed version into the right. The differences appear immediately below: removed lines in red with a minus, added lines in green with a plus, and changed words highlighted inside them.

Why does a changed line appear twice?

A diff describes changes as removals and additions. An edited line is the old line removed and the new line added. With word highlighting on, the exact words that differ are marked in both.

Can I ignore differences in capitalization or spacing?

Yes. Tick Ignore case to treat capital and lowercase letters as equal, and Ignore whitespace to ignore changes in spacing and indentation. Lines that differ only in those ways are then shown as unchanged.

Why is every line marked as changed?

Usually because the line breaks differ: one version was re-wrapped at a different width, or one has the whole text on a single line. The comparison is line by line, so give both texts the same line structure.

Does it detect moved lines?

No. Like Git and most diff tools, it reports a moved line as removed from its old position and added at the new one.

What algorithm does the comparison use?

The Myers difference algorithm, which finds the smallest set of line removals and additions that turns the original into the changed text. Git uses the same algorithm by default.

Can I compare Word documents or PDFs?

Not directly. Copy the text out of each document and paste it in. Formatting such as bold or font changes is not compared, only the text itself.

Is there a size limit?

There is no fixed limit. Texts of several thousand lines compare in a fraction of a second; very large or almost completely different texts take longer.

Is my text uploaded anywhere?

No. Both texts are compared entirely in your browser and nothing is sent to a server.

Related Calculators