How it works
Both texts are split on line breaks. A standard longest-common-subsequence walk then marks each line as unchanged, removed, or added. Moving a line looks like a removal in the old place and an addition in the new one.
Side by side shows the original path on the left and the new path on the right. Inline shows one sequence, with a minus for a removed line and a plus for an added line. The copies stay in your browser.
Formula
- Unit
one line, split on the line break - Unchanged
a line that sits on the shared path
Worked examples
One word changed
“hello / world” against “hello / there” keeps hello and marks world removed and there added.
Identical text
Two copies of the same lines produce only unchanged rows. A trailing difference in blank lines still counts as a line.
| Mark | Meaning | Where |
|---|---|---|
| No mark | The line is in both | Both layouts |
| − | Only in the original | Inline, and the left column |
| + | Only in the change | Inline, and the right column |
Common questions
Are the texts uploaded?
No. The diff runs in your browser.
Does it compare words inside a line?
No. A line is equal or it is not. One changed word marks the whole line.
Why does a moved paragraph look deleted?
The comparison does not track moves. The old position is a removal and the new position is an addition, even when the words match.
Do spaces matter?
Yes. A line with a trailing space is not the same line. Trim it first if you only care about the words.