Diff Viewer
Free online diff viewer tool, no installation required
About Diff Viewer
Compares two text inputs line by line using a Longest Common Subsequence (LCS) algorithm and renders the differences in a unified table with original and modified line numbers, +/- prefixes, and red/green row highlighting. Optional Ignore Whitespace and Ignore Case normalizations let you focus on substantive changes, and a stats bar reports added, removed, and unchanged line counts.
How to Use
1. Paste your original text into the Original Text card (left). 2. Paste your modified text into the Modified Text card (right). 3. Optionally tick Ignore Whitespace and/or Ignore Case. 4. Click Compare to render the stats bar and diff table. 5. Editing either textarea resets the comparison so you can re-run it.
LCS Diff & Normalization
The matcher builds a full (m+1)x(n+1) LCS dynamic-programming table over the original and modified line arrays, then backtracks to emit unchanged, added, and removed lines in order, which yields a minimal edit script rather than a positional diff. When Ignore Whitespace is on, each line is normalized by collapsing all whitespace runs to a single space and trimming before comparison. When Ignore Case is on, lines are lowercased before comparison. The displayed content always shows the original text; only the equality check uses the normalized form. Each output row carries the original line number, the modified line number, a +/-/space marker, and the line content.
▶How is this different from text-diff?
▶What exactly does Ignore Whitespace do?
▶Why does my diff disappear when I edit the text?
▶What do the two leading number columns mean?
If this tool has been helpful to you, consider buying me a coffee.
Buy me a coffee