This diff checker compares two versions of a text and shows exactly which lines were added, removed or left unchanged. It is line-based, runs entirely in your browser, and can ignore case or extra whitespace when that noise is not relevant.
Your data is processed locally in your browser and is not uploaded to our server.
0added0removed0unchanged
Paste both versions to compare themThe line-by-line differences appear here as soon as both sides contain text.
These texts are too large to compare safely. Reduce each side to 800 lines or 100,000 characters.
How to use this tool
1 Paste the original text on the left and the modified text on the right.
2 Read the diff below: green lines were added, red lines were removed and grey lines are unchanged.
3 Switch on “Ignore case” or “Ignore whitespace” if those differences should not count.
4 Copy the diff for a review comment, or clear both sides to compare another pair.
Formula and calculation logic
Line matching
Longest common subsequence of the two line arrays
The tool finds the longest sequence of lines that appears in both texts. Everything outside that sequence is reported as removed from the original or added in the modified version.
Ignoring noise
Key = line, optionally lowercased and whitespace-normalised
With either ignore option enabled, lines are compared by their normalised key but displayed exactly as written. A line that differs only in case or spacing is then treated as unchanged.
Worked example
One changed line
The second line of a three-line text was edited.
Original: alpha, beta, gamma
Modified: alpha, beta two, gamma
Diff: one removed line, one added line, two unchanged
The diff shows the old line with a minus and the new line with a plus. The surrounding lines stay visible as context.
Whitespace-only changes
A file was reformatted with different indentation.
Enable “Ignore whitespace”
Lines that differ only in spacing compare equal
Result: every line is unchanged
The diff becomes empty aside from unchanged lines, which is useful when reviewing formatting-only commits.
Edge cases and accuracy
Line-based, not word-based
A one-word edit inside a line is shown as one removed line and one added line, not as a word-level highlight. This keeps the result easy to read and copy.
Size limits
Very large inputs are refused rather than freezing the page. The limit is 800 lines or 100,000 characters per side; split the text into smaller sections for a larger comparison.
Line endings
Windows and Unix line endings are normalised before comparing, so a file does not appear completely different just because it uses CRLF instead of LF.
Frequently asked questions
Does it highlight changes inside a line?+−
No. The comparison is line-based: a modified line appears once as removed and once as added. That is usually clearer for code, lists and documents.
What do the colours mean?+−
Green lines with a plus were added in the modified text; red lines with a minus were removed from the original; grey lines are unchanged. Each line also has a screen-reader label, so the meaning does not depend on colour alone.
What does “Ignore whitespace” do?+−
It trims leading and trailing spaces and collapses repeated spaces before comparing. Indentation-only changes then count as unchanged.
Why is my large text refused?+−
Comparing very large texts line by line would make the page unresponsive. The tool limits each side to 800 lines or 100,000 characters; compare smaller sections instead.
Is my text uploaded?+−
No. The comparison runs locally in your browser and the text is not sent anywhere.
Related text tools
Count, clean or sort the texts before comparing their versions.