A lightweight, browser-based diff tool built with Vue 3 and Vite. This tool provides a Git-style interface for comparing text directly in your browser, with privacy-focused local storage persistence.
You can use the fully functional tool directly in your browser without any installation:
- Git-Style Visualization: Powered by
diff2htmlandjsdiffto render unified diffs. - Split & Inline Views: Switch between "Side-by-Side" and "Line-by-Line" comparison modes.
- Safe Clear & Undo: Accidentally cleared your work? The Undo button restores content from a temporary buffer.
- Dark Mode Support: Fully optimized GitHub-style dark theme that respects system preferences (Auto/Light/Dark).
- Syntax Highlighting: Automatic code highlighting via
highlight.js. - Privacy Focused: All data is stored in your browser's
localStorage. Nothing is sent to any server. - Raw Patch Export: Generate and copy standard
.diff/.patchtext format.
- Framework: Vue 3 (Composition API,
<script setup>) - Build Tool: Vite
- Diff Engine: jsdiff
- Renderer: diff2html
- Syntax Highlighting: highlight.js
- Node.js (v18.0 or higher)
- npm or yarn
-
Clone the repository:
git clone [https://github.com/caloskao/text-diff-tool.git](https://github.com/caloskao/text-diff-tool.git) cd text-diff-tool -
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open your browser at
http://localhost:5173.
To create a production-ready build:
npm run buildThe output files will be in the dist/ directory, ready to be deployed to any static host (GitHub Pages, Vercel, Netlify, etc.).
This project is licensed under the MIT License.