Capture a tab, detect secrets on-device, and redact screenshots before sharing.
Pending review on the Chrome Web Store | Privacy policy | Developer setup
Open source. This is the complete source code for the RedactShot Google Chrome extension, currently pending approval on the Chrome Web Store. You can inspect every line, load it unpacked, or contribute.
RedactShot is a Manifest V3 Chrome extension that captures the visible tab, a selected region, or the full scrolling page, scans the screenshot locally for sensitive text, lets you review or correct every redaction box, then copies or downloads a redacted PNG. It has no backend, no API keys, no host permissions, and no runtime CDN dependency.
Snip works everywhere now. The region snip was rebuilt after failing on hardened production sites: the in-page overlay no longer loads or crops the screenshot (strict page CSPs were silently killing it) — it only selects a region, and all capture and cropping happens inside the service worker with OffscreenCanvas. Failures are no longer silent either: the popup shows the error, and keyboard-shortcut failures flash a badge on the extension icon.
Full-page scrolling capture. A third popup action scrolls the page in viewport steps, hides sticky headers so they appear only once, and stitches the segments on-device. Long pages are capped to keep memory bounded, with a notice when a capture is truncated.
Multi-language OCR. Spanish, French, German, and Portuguese language packs are now bundled alongside English (nothing is ever downloaded at runtime). Pick the language mix in Options — English stays in the mix so mixed-language screenshots keep working.
Editable redaction boxes. Every detection box in the review screen can be dragged to move and resized by its corner handles; a plain click still toggles it in or out of the redaction. Group headers gained select/deselect-all controls.
Hardening. The service worker is now guaranteed network-silent by a regression test (no fetch at all), the store package is built by an audited allowlist script (npm run package), and a Puppeteer e2e suite (npm run e2e) drives the real capture, snip, and full-page flows in Chromium — the class of real-browser bug that static tests can't catch.
| Review screen | Options |
|---|---|
![]() |
![]() |
| Popup | Onboarding |
|---|---|
![]() |
![]() |
Screenshots leak more than people think: emails, keys, tokens, customer data, internal URLs, and metadata all slip into posts, docs, and support chats. RedactShot is a small, inspectable tool designed around one rule: do the redaction locally before the screenshot leaves your browser.
- Emails, phone numbers, SSNs, credit cards (with Luhn validation).
- API keys, JWTs, GitHub/OpenAI/AWS/Google-style secrets, AWS ARNs.
- IP addresses and MAC addresses.
- Faces via browser-native
FaceDetectorAPI (when available). - Two-pass detection: fast DOM text scan using temporary
activeTabaccess, then OCR via bundled Tesseract.js WASM with bundled language data (English, Spanish, French, German, Portuguese). - Manual redaction boxes for anything auto-detection misses.
- All processing happens on-device. No screenshots, OCR text, detections, or settings are sent to a server.
- No backend. No API keys. No analytics. No host permissions.
- Tesseract.js, WASM cores, and all OCR language data are bundled under
vendor/tesseract/— no CDN fetch at runtime. - Extension CSP restricts connections to
self, and a regression test guarantees the service worker contains nofetchcall at all. - Captures are stored in extension-local IndexedDB for the review workflow, then pruned automatically.
The manifest uses only:
["activeTab", "scripting", "clipboardWrite"]No host_permissions. No <all_urls>. No tabs permission.
| Permission | Why |
|---|---|
activeTab |
Allows the user-invoked capture and temporary access to the current tab. |
scripting |
Runs a temporary visible-text collector on the active tab after user invocation. No persistent content script. |
clipboardWrite |
Enables the Copy PNG action from the review screen. |
git clone https://github.com/darkzOGx/RedactShot.git
cd RedactShot- Open
chrome://extensions. - Enable Developer mode.
- Click Load unpacked.
- Select this project folder.
- Pin RedactShot.
- Click Capture Tab (
Ctrl+Shift+R), Capture Full Page, or Snip Region (Ctrl+Shift+S).
npm test # static suites: detector, policy, OCR, snip/full-page math, review UI
npm run audit:manifest
npm run e2e # real-browser Puppeteer suite (installs Chromium via `npm install`)
npm run package # build the audited Web Store zipThe detector tests cover OCR-style misreads, unformatted cards, Luhn rejection, secret patterns, IP/MAC detection, split card groups, and category disabling. The e2e suite loads the extension into headless Chromium and exercises capture, a real mouse-drag snip, and full-page stitching against fixture pages with fake secrets. npm test stays dependency-free; only the e2e suite needs npm install.
redactshot/
src/ Background worker, detector, OCR, redactor, policy, review, popup, options, settings
vendor/ Bundled Tesseract.js WASM + language data (eng, spa, fra, deu, por)
styles/ CSS for popup, options, review, onboarding
assets/ Icons and brand images
store/ Chrome Web Store listing assets and screenshots
tests/ Unit tests plus a Puppeteer e2e suite (tests/e2e/)
tools/ Manifest audit and store packaging scripts
src/background.js: Service worker — capture, snip, full-page stitching, and tab messaging.src/snip.js/src/fullPage.js: Pure, Node-tested geometry for region cropping and scroll planning.src/detector.js: Regex-based sensitive data detection with Luhn, pattern, and category logic.src/ocrWords.js: Tesseract.js OCR integration for screenshot text extraction.src/redactor.js: Canvas-based redaction rendering.src/redactionPolicy.js: Policy engine for detection categories and toggles.src/review.js: Review screen UI — toggle, add, remove redaction boxes, export.src/popup.js: Popup UI for capture and snip actions.src/options.js: Options page for redaction style and detection preferences.
- OCR quality depends on screenshot scale, font size, contrast, and language. Manual boxes are intentionally part of the workflow because auto-detection can miss data.
- Face detection uses the browser-native
FaceDetectorAPI if available. It is not guaranteed in every Chrome environment. Manual boxes cover the fallback. - The DOM text pass detects visible page text quickly, but cannot see text inside images, videos, remote canvases, or cross-origin embedded content. OCR is the fallback for those cases.
- Full-page capture scrolls the window itself; pages that scroll inside an inner container fall back to a visible-viewport capture. Very long pages are truncated at a memory cap (a notice appears in review), and OCR is skipped on extremely large stitched images in favor of the DOM scan.
- Screen recordings are out of scope.
RedactShot is currently pending review on the Chrome Web Store. Once approved, an install link will appear at the top of this README.
Store listing assets live in store/:
icon-128.pngsmall-promo-440x280.pngmarquee-1400x560.pngscreenshot-{1..4}-*.png



