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
- Open
https://soumendrak.github.io/diff-checker/in any browser. - No build step, no installation, no server required.
- Deploy anywhere — GitHub Pages, Netlify, or any static host.
git clone https://github.com/soumendrak/diff-checker.git
# Open index.html directlyLicense
Licensed under the MIT License.
Built with ❤️ and zero dependencies