GitHub


Features

  • Two textareas side by side (stacked on mobile)
  • Green background for added lines, red for removed
  • Line numbers on both sides
  • Character-level diff within changed lines
  • Custom LCS diff algorithm in ~100 lines of JS
  • Word wrap toggle
  • Clear buttons for each textarea
  • Dark theme with orange accent (#ff6b35)

How It Works

A Longest Common Subsequence (LCS) algorithm compares the two texts line-by-line. Lines present only in the left text get a red background; lines present only in the right get green. For changed lines, a character-level LCS pass highlights individual changed characters. Results update on button click.

Usage

  1. Open https://soumendrak.github.io/diff-checker/ in any browser.
  2. No build step, no installation, no server required.
  3. Deploy anywhere — GitHub Pages, Netlify, or any static host.
git clone https://github.com/soumendrak/diff-checker.git
# Open index.html directly

License

Licensed under the MIT License.


Built with ❤️ and zero dependencies

Read the original on github.com ↗