A privacy-focused diff tool. Paste two texts, see what changed. No accounts, no tracking, works offline.
- No server; everything runs locally in the browser
- Share via URL: diffs are compressed and encoded in the URL
- Works offline as an installable PWA
- Minimap: visual overview for navigating large diffs
- Drag and drop files directly into the text areas
- Download patch files compatible with
git apply - Ignore options: whitespace, quote style (" vs ')
- Keyboard shortcuts:
- Cmd/Ctrl+Enter: compare texts
- j/n: next change
- k/p: previous change
- e: edit (back to input)
- Shift+click on collapsed section: expand/collapse all
Please do! I'd appreciate bug reports, improvements (however minor), suggestions…
The tool uses vanilla JavaScript, HTML, and CSS. To run locally:
- Clone the repository:
git clone https://github.com/welpo/kawari.git - Navigate to the app directory:
cd diff/app - Start a local server:
python3 -m http.server - Visit
http://localhost:8000in your browser
The important files are:
app.js: UI logic and event handlingdiff.js: diff algorithms (Myers, Patience) and patch generationdiff.worker.js: Web Worker for off-main-thread diffingstyles.css: stylesindex.html: structure
Tests live in tests/ and use Node's built-in test runner:
node --test tests/*.mjspatch.test.mjs: verifies generated patches can be applied withgit apply. Each test case intests/cases/has anoriginal.txtandmodified.txt.normalization.test.mjs: tests whitespace/quote normalization logic.
Something not working? Have an idea? Let me know!
- Questions or ideas → start a discussion
- Found a bug? → report it here
- Feature request? → let me know
kawari is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
