Text Diff Checker

Compare two texts and highlight every added and removed line.

Runs locally in your browser. Your input is not uploaded or stored. You can verify this in your browser’s network panel.

What does this tool solve?

Paste two versions of a text to see exactly which lines were added or removed. The comparison is line-based, computed with a longest-common-subsequence algorithm, entirely in your browser.

What examples should you start with?

One line changed

Input

a\nb\nc → a\nB\nc

Output

1 removed (b), 1 added (B)

Identical inputs

Input

same text on both sides

Output

“No differences — the texts are identical.”

How does it work?

Both inputs are split into lines and compared with a classic LCS dynamic program: unchanged lines anchor the alignment, everything else is reported as removed or added with its line number.

CRLF and LF line endings are normalized before comparison so Windows and Unix files compare cleanly.

What are the edge cases and limits?

  • The diff is line-based; a one-character change appears as a removed line plus an added line.
  • Whitespace differences are significant — trailing spaces count as a change.
  • Inputs are limited to 20,000 lines each to keep the page responsive.

Technical reference

Related tools