Text Diff Checker

Paste an original and a changed version to see a clear line-by-line comparison — additions in green, removals in red — so you can spot exactly what differs. The comparison runs entirely in your browser.

Paste text in both boxes and press Compare.

How the diff works

A diff finds the smallest set of changes that turns one text into another. This tool compares line by line using the classic longest common subsequence (LCS) idea: it finds the longest run of lines the two versions share, in order, then marks everything else as added or removed.

unchanged = longest common subsequence of lines

Lines present only in the original are removals; lines present only in the changed version are additions; lines in both, in the same relative order, are unchanged context.

Worked example

Changing "jumps over" to "leaps over" and adding a line:

Unchanged: the first and "Calcool is free" lines match.
Removed: "jumps over the lazy dog".
Added: "leaps over the lazy dog" and "and accurate".

Reading the result

Each line is prefixed so the change is unmistakable: + and a green background for additions, and a red background for removals, and a plain background for lines that are the same in both. A summary shows how many lines were added, removed and left unchanged. This line-level view is ideal for prose, config files, logs and code — comparing whole lines rather than individual characters keeps the output readable.

Tip: only need to know if the totals match, e.g. word counts before and after an edit? Use the word counter.

Frequently asked questions

How does a text diff work?

It finds the longest sequence of lines the two texts have in common, then marks the leftover lines as added (only in the new text) or removed (only in the original), giving a clear line-by-line comparison.

What do the colours mean?

Green lines with a + were added in the changed text; red lines with a − were removed from the original; plain lines are identical in both versions.

Does it compare word by word or line by line?

Line by line, which keeps the result readable for prose, configuration files, logs and code. A whole line that changed shows as one removal plus one addition.

Is my text uploaded anywhere?

No. Both texts are compared entirely in your browser, so nothing you paste — including private or sensitive content — leaves your device.

MB
Mustafa Bilgic · Editor, Calcool
The comparison uses a longest-common-subsequence line diff, the same core idea behind tools like the Unix diff utility. Everything runs in your browser — nothing you enter is uploaded, logged or stored.

Related calculators