Toolverge

Text Diff Compare

A text diff tool compares two versions of text and highlights which lines were added, removed, or stayed the same — the same line-level comparison behind tools like `git diff`. The longest common subsequence algorithm is the same core technique behind git diff and most version-control tools, which is why lines that only moved position, rather than actually changing, can still show up as one removal and one addition instead of being recognized as unchanged.

2 added · 1 removed

line one
-line two
+line TWO
line three
+line four

How it works

  1. Paste the original text on the left and the changed text on the right.
  2. Read the combined result: unchanged lines are plain, removed lines are marked "-", added lines are marked "+".
  3. Use the added/removed counts above the result for a quick summary.

Formula Longest common subsequence (LCS) over lines, then backtracked into same/added/removed rows

Frequently asked questions

Does this compare word by word or line by line?

Line by line. A single-character edit on a long line will still show that whole line as one removal plus one addition.

Does line order matter?

Yes — moving a block of lines shows as a removal at the old position and an addition at the new one, the same way `git diff` reports a move.

Is whitespace-only difference detected?

Yes — trailing spaces or different indentation make two otherwise-identical lines count as different.

Is this the same algorithm as git diff?

The same family — both are longest-common-subsequence based line diffs, though git additionally supports word-level and rename detection.

Is my text uploaded anywhere?

No. Comparison runs entirely in your browser.