Juxta — a fast, self-hostable, open-source side-by-side text & code diff tool. An open alternative to text-compare.com.
- Split & unified views — side-by-side or stacked diff rendering with smooth transitions
- Syntax highlighting — TypeScript/JS, HTML, CSS, JSON, and plain text with auto-detection
- Word & character inline diff — configurable granularity for intra-line changes
- Search with navigation — highlight matches and jump prev/next across both panes
- Whitespace / wrap / line-number toggles — per-session display controls
- Soft & high-contrast colour schemes — light and dark theme variants
- Per-side text transforms — lowercase, sort lines, remove excess whitespace, replace line breaks
- Swap & clear — one-click input management
- 4-format export — download diff as HTML, TXT, Markdown, or JSON
- Persisted preferences — all settings saved in localStorage, restored on reload
- Keyboard shortcuts — full Alt-key shortcut set; discoverable via Alt+K modal
- Sample loader — built-in example diffs to explore features immediately
- Light / dark theme — auto-follows system preference, manually overridable
- Analytics bar — live counts of additions, deletions, and changed lines
- Responsive layout — adapts gracefully from mobile to widescreen
Pull the published image from GitHub Container Registry and run it:
docker run -p 3000:3000 ghcr.io/pranavp1507/juxta:latestOr build it from source instead:
docker build -t juxta:latest .
docker run -p 3000:3000 juxta:latestThen open http://localhost:3000.
Environment variables:
| Variable | Default | Purpose |
|---|---|---|
PORT |
3000 |
HTTP port the server listens on |
ORIGIN |
(unset) | Public URL (required for CSRF protection in production, e.g. https://diff.example.com) |
Create a docker-compose.yml:
services:
juxta:
image: juxta:latest
ports:
- "3000:3000"
environment:
ORIGIN: https://diff.example.com
restart: unless-stoppedThen:
docker compose up -dPrerequisite: Bun ≥ 1.0
# Install dependencies
bun install
# Start dev server (hot reload, port 3000)
bun run dev
# Production build
bun run build
# Unit tests
bun test
# End-to-end tests (requires Playwright browsers installed)
bun run test:e2e
# Type-check
bun run check| Layer | Technology |
|---|---|
| Framework | SvelteKit + Svelte 5 |
| Runtime / package manager | Bun |
| Styling | Tailwind CSS v4 |
| Diff engine | Custom pure-TS LCS diff (no runtime deps) |
| Testing | Bun test + Playwright |
Juxta is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).
See LICENSE for the full text.
In short: you can use, modify, and self-host Juxta freely. If you distribute a modified version or run it as a network service, you must release your modifications under the same licence.