A fast, privacy-focused .docx / .doc viewer that runs entirely in the browser. No uploads. No servers. Fully client-side.
👉 Live / Repo:
https://basemax.github.io/online-docx-viewer
- 📂 Drag & drop or browse files
- 📄 Supports
.docxand.doc - 🔒 100% offline-first your files never leave your device
- ⚡ Fast rendering using
mammoth.js - 📑 Automatic pagination
- 🔍 Zoom controls (50% → 250%)
- ⌨️ Keyboard navigation (← → PgUp PgDown Home End)
- 🖨️ Print / Export to PDF
- 📱 Fully responsive UI
- 🌐 Service Worker caching (PWA-ready)
Open index.html directly in your browser no build step required.
- Vanilla JavaScript (no framework)
- Service Worker (offline caching)
mammoth.jsfor DOCX parsing- Pure CSS (no dependencies)
.
├── index.html # Main UI + logic
├── sw.js # Service Worker (offline support)
└── README.md
- Parsed using
mammoth.js - Converted to clean HTML
- Paginated based on content size
- Attempted via mammoth (limited support)
- Fallback: plain text extraction
index.htmlcached on installmammoth.jscached on first load- Works offline after first visit
- No backend → zero privacy risk
- HTML-based rendering → selectable text, accessible
- Pagination heuristic → balances readability and performance
- Graceful fallback for
.docinstead of failure
| Key | Action |
|---|---|
| → / PageDown | Next page |
| ← / PageUp | Previous page |
| Home | First page |
| End | Last page |
Ctrl/Cmd + + |
Zoom in |
Ctrl/Cmd + - |
Zoom out |
Ctrl/Cmd + 0 |
Reset zoom |
Ctrl/Cmd + P |
Print / PDF |
-
.docsupport is best-effort only -
Complex Word features may not fully render:
- Advanced layouts
- Embedded objects
- Some tables/styles
-
Pagination is approximate (not true Word layout engine)
- Better
.docparsing - Search in the document
- Dark mode
- Highlight / annotations
- Multi-file tabs
- Drag multiple files
No setup required:
git clone https://github.com/BaseMax/online-docx-viewer.git
cd online-docx-viewer
open index.htmlFor proper Service Worker behavior, use a local server:
npx serve
# or
python -m http.server- Files are never uploaded
- All processing happens in-browser
- No analytics, no tracking
MIT License © 2026
Seyyed Ali Mohammadiyeh (Max Base)