Snip any region of a YouTube video and instantly copy the text inside it β code, subtitles, captions, anything on screen.
| π±οΈ Select-and-snip | Draw a box over any part of a YouTube video to capture text from that region |
| π― High-accuracy OCR | Powered by Tesseract.js, with preprocessing (upscaling, contrast stretching, dark-mode inversion) tuned for video frames |
| π Runs entirely in-browser | OCR happens locally via a Web Worker β no server calls, no data leaves your machine |
| π Instant clipboard copy | Extracted text is copied automatically, with a toast preview |
| πͺΆ Lightweight | Manifest V3 extension with a minimal permission footprint (offscreen only) |
Since this extension isn't published on the Chrome Web Store yet, install it manually:
- Clone the repository
git clone https://github.com/Anmol1578/Snap-Text.git
- Open Chrome and go to
chrome://extensions - Enable Developer mode (top-right toggle)
- Click Load unpacked and select the
Snap-Textfolder - The SnapText icon will appear in your extensions toolbar
- Open any video on youtube.com
- Click the Select area button that appears on the player
- Draw a box around the text you want to capture
- The text is OCR'd and copied to your clipboard automatically β
- JavaScript β Manifest V3 Chrome Extension
- Tesseract.js β in-browser OCR engine
- Offscreen Documents API β runs OCR in a Web Worker, isolated from YouTube's page CSP
Snap-Text/
βββ manifest.json # Extension configuration (MV3)
βββ content.js # Injected into YouTube β handles area selection & capture
βββ content.css # Styling for the selection overlay and toasts
βββ background.js # Service worker β relays OCR requests to the offscreen doc
βββ offscreen.js # Runs Tesseract.js OCR in a Web Worker
βββ offscreen.html
βββ icons/
βββ vendor/ # Bundled Tesseract.js core + language data
Licensed under the ISC License.
Made with β by Anmol1578