Text Diff Checker
Line-by-line comparison of two texts, with added/removed lines highlighted.
🔒 Runs entirely in your browser — nothing here is ever uploaded
About the Text Diff Checker
Compares two blocks of text line by line and highlights added and removed lines, using a Longest Common Subsequence algorithm — the same textbook foundation Unix diff and git use to find the minimal set of changes between two versions of text.
- Paste your original text on the left and the changed text on the right.
- Optionally toggle Ignore case or Ignore leading/trailing whitespace.
- Read the line-by-line diff, with added lines in green and removed lines in red.
Comparing "jumps over the lazy dog" against "jumps over the lazy cat" (with identical lines before and after): the diff shows 1 line removed (dog) and 1 line added (cat), with the surrounding identical lines marked unchanged.
Comparison happens entirely client-side — no text is sent anywhere. Ignore case and Ignore whitespace only affect which lines are treated as 'equal' versus 'changed'; the displayed line text is always your original, unmodified input. Input is capped at 5,000 lines per side, since the algorithm's work grows with the product of both texts' lengths — larger inputs would freeze the page rather than finishing quickly.
- • Use Ignore whitespace when comparing code or config files reformatted by a linter — it strips leading/trailing whitespace and collapses internal runs of spaces before comparing.
- • Use Ignore case when comparing text where capitalization doesn't matter to you (e.g., checking if two paragraphs say the same thing regardless of styling).
- • For very large files (beyond 5,000 lines per side), split the comparison into smaller sections — the algorithm's cost grows with the product of both lengths.
- GNU Diffutils manual — how the diff algorithm (LCS-based) works — accessed 2026-08-30