Text Diff / Compare

Highlight differences between two blocks of text side by side.

Compare Texts

Diff Result

About the Text Diff / Compare

Text Diff compares two blocks of text and highlights what changed between them. Paste the original on one side and the modified version on the other, and the result marks lines that were added, removed or left alone.

The comparison works line by line using a longest-common-subsequence algorithm, the same family of method that version control tools use. That means it finds the smallest set of line insertions and deletions that turns one text into the other, rather than flagging everything after the first difference.

Because it compares lines, a single character changed inside a long line shows the whole line as modified. For prose that is usually what you want; for code review, where you care which character moved, a word-level diff is more informative.

Common questions about Text Diff & Compare

How does the comparison work?

It compares the two texts line by line and finds the longest shared sequence of lines, then reports the insertions and deletions around it.

Does it compare words or lines?

Lines. A one-character edit inside a line marks that whole line as changed.

What do the markings mean?

Lines only in the original were removed, lines only in the modified text were added, and unmarked lines are identical in both.

Does it ignore whitespace differences?

No, spacing counts as part of the line. Trailing spaces will show up as a change.

Is there a size limit?

Very large texts are slow because the algorithm compares every line against every other. A few thousand lines is comfortable.

Is my text uploaded?

No, the comparison runs entirely in the browser.

Related Tools in Text Tools

Word CounterCharacter CounterCase Converter