Text Diff

Compare two blocks of text line by line, highlight added, removed and unchanged lines, with options to ignore case and surrounding whitespace, plus a change count. 100% client-side, nothing uploaded.

Original text
Changed text
Paste two texts, then click "Compare". Changed lines are highlighted.
Comparison result (left: original line number, right: changed line number)
The comparison result will appear here.
AD · LEADERBOARD 728×90 (PLACEHOLDER — REPLACED WHEN ADSENSE GOES LIVE)

FAQ

How does the text diff work?
The tool splits both texts into lines and compares them line by line with a longest-common-subsequence algorithm, marking lines that appear only on the left (removed), only on the right (added), and on both sides. Original line numbers are shown on the left and revised numbers on the right.
How large a text can it handle?
Normal config, code and document snippets are fine. To keep memory and speed reasonable, when the compared region is extremely large the tool degrades to a coarse “removed + added” comparison; for fine-grained results keep each comparison under a few thousand lines.
Can I ignore case or whitespace differences?
Yes. Checking “Ignore case” treats A and a as equal; checking “Ignore leading/trailing spaces” makes leading/trailing spaces and tabs not affect the comparison. The original content is still shown as-is; only normalization during comparison changes.
Is my text uploaded?
No. All comparison happens locally in your browser; your text is never sent to any server.