A lightweight, installable PWA for diffing two pieces of text. Paste content into both sides — or drop files — and the diff renders instantly with side-by-side / unified toggle, word-level highlighting, and syntax highlighting.
- Open spskelly.github.io/diff-viewer
- Install — click the install icon in the address bar, or use your browser menu and choose "Install Diff Viewer"
- Set as default (optional, Chromium only) — right-click a text file, choose "Open with", pick "Diff Viewer", enable "Always use this app"
That's it.
Chromium-based browsers (Chrome, Edge, Brave) get the file handler feature. Firefox and Safari can use the app but won't register it as a system file handler.
- Paste-first — drop two text snippets into the panes and see the diff immediately
- File upload + drag-and-drop — fill either side from disk
- Side-by-side / unified — toggle between the two layouts
- Word-level highlighting — see exactly which words change inside a line
- Syntax highlighting — 100+ languages via highlight.js (auto-detect or pick one)
- Ignore whitespace — hide whitespace-only differences
- Collapsed unchanged regions — long unchanged stretches collapse automatically
- Dark / light mode — toggle with
Ctrl+D, preference persists - Offline — works without internet after install
- OS file handler — open one or two text files from your OS into the viewer
- Keyboard shortcuts — press
?for the full list
A standalone, no-install-needed diff viewer. Most options are either heavy IDE features, online services that send your text to a server, or terminal tools. This is a tiny static page that runs locally, works offline, and registers as a file handler so two-file diffs from the file manager just work.
Five files, no build:
index.html— app shellapp.js— state, diff pipeline, UI wiringstyles.css— layout + theme + diff2html overridesmanifest.json— PWA config and file handlersservice-worker.js— offline caching
Serve over http:// or https:// (not file://) for the service worker to register:
python -m http.server 8000
# then open http://localhost:8000/MIT