Text Diff Checker
Compare two blocks of text and instantly see what was added, removed, or unchanged.
How to Compare Two Blocks of Text
- Paste your original text into the "Original Text" box and the changed version into "Changed Text".
- Optionally check "Ignore leading/trailing whitespace per line" if you only care about content changes, not re-indentation.
- Click Compare to run the diff.
- Review the color-coded output: green lines were added, red lines were removed, and plain lines are unchanged β the status line above also totals the additions and removals.
Frequently Asked Questions
How does the diff algorithm actually work?
It runs a classic longest-common-subsequence (LCS) algorithm over the lines of both texts. The algorithm finds the longest sequence of lines that appears, in order, in both versions, then marks every other line as added or removed relative to that shared sequence.
Does it compare word-by-word or character-by-character?
No β the comparison works line by line. If a single word changes in the middle of a line, the entire line is shown as one removed line and one added line rather than highlighting just the changed word.
What does "Ignore leading/trailing whitespace per line" actually change?
When checked, each line has its leading and trailing whitespace trimmed before comparison, so re-indented lines won't show as changed. Whitespace differences in the middle of a line are still detected.
Is there a limit on how much text I can compare?
Yes. If the number of lines in text A multiplied by the number of lines in text B exceeds 4,000,000, the tool refuses to run the comparison and asks for shorter excerpts, since the LCS grid used for the diff grows with the product of both line counts.
Is my text uploaded to a server when I click Compare?
No. The entire diff is computed locally in your browser's JavaScript β neither text box is sent anywhere, so you can safely compare drafts or sensitive text.