The Pain of Masking PII for LLMs — And Why I Built a 100% Client‑Side Solution
Description and use
MaskFlow AI removes manual PII scrubbing for LLMs, runs client‑side, and uses synthetic aliases to preserve code integrity while protecting privacy.
Problem
Developers repeatedly scrub sensitive data (API keys, emails, phone numbers) before sending code or logs to LLMs, then manually restore it from the AI’s response, creating a tedious privacy‑risk workflow.
Outcome
MaskFlow AI eliminates manual scrubbing, protects privacy by running entirely client‑side, and improves LLM accuracy with synthetic aliases, achieving up to 90% token savings via SchemaSlim.
Workflow
- 1. Paste source text into MaskFlow AI web app or CLI. 2. Tool auto‑detects secrets via regex and Shannon entropy. 3. User optionally selects synthetic alias mode or custom regex. 4. MaskFlow replaces secrets with placeholders or aliases. 5. LLM processes masked text. 6. AI response is returned with placeholders/aliases. 7. One‑click restore replaces placeholders with original secrets.
- 8. For CLI users, run maskflow_cli.py on local files to sanitize repositories or logs instantly.
Evidence
Manually scrubbing API keys (sk_live_..., AIza...) and replacing them with xxxx.
MaskFlow AI — a 100% client‑side privacy tool that runs entirely in your browser's memory. No network traffic, no server uploads, zero API keys sent anywhere.
Shannon entropy (H(X) ≥ 3.85 bits/char) and character‑class transitions to automatically detect and mask high‑entropy unknown tokens.
Synthetic Alias Mode (Preserving LLM Code Accuracy) ... use valid syntax dummies like [email protected] or 10.240.0.1.
CLI & Offline Pro Pack for Power Users ... zero‑dependency Python CLI (maskflow_cli.py).
- Record date: 2026-10-19T18:56:08.621Z