Side-by-side and unified diff viewer — paste and compare text right in your browser.
diffr is a zero-dependency, single-file HTML app for comparing text. Paste two versions, see exactly what changed.
- Side-by-Side mode — original and changed text aligned line by line
- Unified mode — classic diff format with context hunks
- LCS-based diff algorithm — accurate line-level comparison
- Auto-diff — results update automatically while you type (300ms debounce)
- Tab size control — renders tabs as 2, 4, or 8 spaces
- Syntax-coloured diff output — green additions, red deletions, neutral context
- Diff summary — shows +added/-removed/=unchanged line counts in header
- Word Wrap — toggle to wrap long lines instead of scrolling
- Copy diff — one-click copy as unified diff text
- Save diff — download diff as
.patchfile - Live indicator — shows auto-diff is active
- Clear — reset both input panels
- Keyboard shortcut —
Ctrl+Shift+Cclears both panels - Zero dependencies — no libraries, no build step, no telemetry
- Open diffr
- Paste the original text in the left panel
- Paste the changed text in the right panel
- See the diff instantly
Switch between Side and Unified modes with the toggle in the toolbar.
diffr implements a Longest Common Subsequence (LCS) algorithm from scratch to compute line-level diffs. The entire application is a single HTML file with inline CSS and JavaScript — no frameworks, no build tools, no network requests after page load.
MIT