Skip to content

neocrev/diffr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

diffr

Side-by-side and unified diff viewer — paste and compare text right in your browser.

GitHub Pages License Zero deps

neocrev.github.io/diffr


diffr is a zero-dependency, single-file HTML app for comparing text. Paste two versions, see exactly what changed.

Features

  • 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 .patch file
  • Live indicator — shows auto-diff is active
  • Clear — reset both input panels
  • Keyboard shortcutCtrl+Shift+C clears both panels
  • Zero dependencies — no libraries, no build step, no telemetry

Usage

  1. Open diffr
  2. Paste the original text in the left panel
  3. Paste the changed text in the right panel
  4. See the diff instantly

Switch between Side and Unified modes with the toggle in the toolbar.

Technical

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.

License

MIT

About

Side-by-side and unified diff viewer — paste and compare text

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages