Text Diff Checker

Compare two text blocks line by line. See exactly what was added, removed, or left unchanged with instant color-coded results.

🟢📊 Diff Result

Paste two text blocks and click Compare to see the line-by-line diff...

🟢📖 How Text Diff Works

This tool uses a line-based diff algorithm to compare two text blocks. It splits each input into lines and computes the longest common subsequence (LCS) to identify:

  • Added lines —lines present in the modified text but not in the original.
  • Removed lines —lines present in the original but removed in the modified text.
  • Unchanged lines —lines identical in both texts.

The algorithm finds the minimal set of additions and removals to transform the original text into the modified text. This is the same fundamental approach used by tools like diff and git diff, simplified for readability.

See also: JSON Diff · Character Counter · JSON Formatter