Stop Leaking API Keys & Customer Data in Looms & AI Prompts: Building a 100% Local PII Scrubber and Demo Mode in Vanilla JS An independent developer built DemoCloak, a free Manifest V3 Chrome/Edge extension and two zero-upload web tools that detect and mask sensitive data such as API keys, emails, and card numbers entirely client-side in vanilla JavaScript. The engine uses Luhn checksums to avoid false-positive card matches, priority-ordered token detection for secrets like sk_live_ and AKIA keys, and 32-bit FNV-1a hashing to map matched strings to deterministic realistic placeholders that can be restored to the original DOM. The extension requests only activeTab, scripting, storage, and tabs permissions, using optional_host_permissions for per-domain auto-apply, and is currently under review on the Chrome Web Store and Microsoft Edge Add-ons. Every developer has had the same minor heart attack: you share your screen on Zoom, record a Loom walkthrough, or paste a production JSON stack trace into Claude/ChatGPT—and two seconds later notice a real customer email, revenue total, or sk live key sitting right there on screen. Existing screen-blur extensions mostly fall into two camps: manual click-only blur tools that smear your whole UI into ugly smudges, or cloud/subscription tools that charge monthly fees just to hide text. So I built two free zero-upload web tools plus a lightweight Manifest V3 Chrome/Edge extension DemoCloak powered by the exact same 100% client-side vanilla JS detection engine. Here are the four engineering problems that actually mattered when building it cleanly: Naive regex redactors ruin dashboards because a 16-digit order ID looks like a credit card, and 2026-11-25 looks like a phone number. For card detection, every candidate match runs through a lightweight Luhn checksum before we touch the DOM: js export function isValidLuhn digitsOnly { const digits = String digitsOnly || '' .replace /\D/g, '' ; if digits.length < 13 || digits.length 19 return false; if /^ \d \1+$/.test digits return false; let sum = 0; let dbl = false; for let i = digits.length - 1; i = 0; i -= 1 { let d = digits.charCodeAt i - 48; if dbl { d = 2; if d 9 d -= 9; } sum += d; dbl = dbl; } return sum % 10 === 0; } We also enforce strict priority precedence: developer tokens sk live , ghp , AKIA , AIza , xoxb- , JWTs, Bearer ... match before generic emails or numbers, and custom user keywords/regex take top priority. Blurred boxes work for quick meetings, but they look awful in product demos, docs, and landing page screenshots. Instead of random gibberish, we hash each matched string with 32-bit FNV-1a so identical customer emails or revenue totals map deterministically to the same realistic placeholder everywhere on the page—preserving currency symbols $ , € , £ , ¥ , European vs. US decimal commas, and rough order of magnitude: $48,920.50 → $62,480.00 ceo@realclient.io → alex.chen@acme.example sk live ... → sk live demo ••••9f2a Every wrapped