Extract text from any image on any webpage — locally, using OCR powered by Tesseract.js. No external APIs, everything runs in your browser.
- Right-click any image → "Extract Text with SnapText"
- Local OCR via Tesseract.js (no data leaves your machine)
- Multi-language: English, German, French (loaded simultaneously)
- Clean slide-in overlay with live progress indicator
- One-click Copy to clipboard
- Fully Manifest V3 compliant
snaptext/
├── manifest.json # Extension manifest (V3)
├── background.js # Service worker – context menu & message routing
├── content.js # Content script – overlay UI
├── overlay.css # Shadow-DOM-scoped overlay styles
├── offscreen.html # Offscreen document shell
├── offscreen.js # Tesseract.js OCR logic
├── package.json # npm dependencies
├── scripts/
│ └── build.js # Copies Tesseract.js files into lib/
├── lib/ # (generated) Tesseract.js runtime
│ ├── tesseract.min.js
│ ├── worker.min.js
│ └── tesseract-core-*
├── icons/
│ ├── icon.svg # Source vector icon
│ ├── icon16.png # (generated)
│ ├── icon48.png # (generated)
│ └── icon128.png # (generated)
└── tools/
└── generate-icons.html # Open in Chrome to export PNGs
- Node.js ≥ 16
- Google Chrome
# 1. Install dependencies
npm install
# 2. Copy Tesseract.js runtime files into lib/
npm run build- Open
tools/generate-icons.htmlin Chrome - Click Download All
- Move the three PNG files into the
icons/folder
- Open chrome://extensions/
- Enable Developer mode (top-right toggle)
- Click Load unpacked → select this project folder
- Done — right-click any image and choose "Extract Text with SnapText"
- User right-clicks an image → selects the context-menu item
- The background service worker creates an offscreen document (if needed) and passes the image URL
- The offscreen document fetches the image and runs Tesseract.js OCR in a Web Worker
- Results are relayed back through the background to the content script
- The content script renders the extracted text in a Shadow-DOM overlay
MIT