π If you're trying PrivacyFirewall, please star the repo!
It helps others discover the project and motivates development. Takes 2 seconds β β (top right)
Stop AI Data Leaks Before They Happen
100% Local β’ Zero Server β’ Full Control
Every day, sensitive data gets leaked to AI chatbots:
- π§ Customer emails pasted into ChatGPT for summarization
- π API keys accidentally included in code snippets
- π€ Employee names shared in meeting notes
- π³ Credit card numbers copied from support tickets
- π Home addresses in shipping data analysis
Traditional DLP tools don't protect AI chat interfaces. PrivacyFirewall does.
PrivacyFirewall intercepts sensitive data before it reaches AI tools β running entirely in your browser with no external servers.
| Feature | Description |
|---|---|
| π‘οΈ Paste Protection | Blocks sensitive pastes with a confirmation modal |
| β¨οΈ Real-time Typing Detection | Warns as you type sensitive data |
| π§ Local AI Detection | BERT NER model runs in-browser via ONNX/WASM |
| βοΈ Configurable Rules | Enable/disable specific PII types, set block vs warn |
| π Site Management | Protect ChatGPT, Claude, Gemini, Copilot, and more |
| π Zero Data Transmission | Nothing ever leaves your machine |
graph TD
A[User Pastes/Types Text] -->|Intercept| B(Content Script)
B -->|Layer 1| C{Regex Scan}
C -->|Match Found| D{Block or Warn?}
D -->|Block| E[π Show Modal]
D -->|Warn| F[β οΈ Show Banner]
C -->|No Match| G{AI Engine Ready?}
G -->|Yes| H[ONNX Model in Browser]
H -->|Entities Found| D
H -->|Clean| I[β
Allow]
G -->|No| I
style E fill:#dc2626,color:#fff
style F fill:#f59e0b,color:#fff
style I fill:#22c55e,color:#fff
- Instant Regex Layer β Catches obvious patterns (emails, credit cards, API keys) in milliseconds
- AI Layer β BERT Named Entity Recognition detects names, organizations, and locations that regex misses
Both layers run 100% locally in your browser. No Python server. No API calls. No cloud.
Perfect for trying it out β takes 30 seconds
-
Download the latest release:
-
Unzip the downloaded file
-
Install in Chrome:
- Go to
chrome://extensions - Enable Developer mode (toggle in top right)
- Click Load unpacked
- Select the unzipped folder
- Go to
-
Done! Visit ChatGPT and try pasting:
Contact john.doe@company.com or call 555-123-4567
Click to expand developer instructions
-
Clone the repository
git clone https://github.com/ArnabKar/privacy-firewall.git cd privacy-firewall -
Build the extension
cd src/extension npm install node build.js -
Load in Chrome
- Navigate to
chrome://extensions - Enable Developer mode (top right)
- Click Load unpacked
- Select the
src/extension/distfolder
- Navigate to
![]() Paste Blocked Sensitive data detected with highlighting |
![]() Typing Warning Real-time detection as you type |
![]() Extension Popup Quick status and settings access |
![]() Settings Page Full control over detection rules |
| Type | Examples |
|---|---|
| π§ Email | user@example.com |
| π± Phone | 555-123-4567, +1 (555) 123-4567 |
| π³ Credit Card | 4532-0151-1283-0366 |
| π’ SSN | 123-45-6789 |
| π AWS Keys | AKIAIOSFODNN7EXAMPLE |
| π« JWT Tokens | eyJhbGciOiJIUzI1NiJ9... |
| π Private Keys | -----BEGIN RSA PRIVATE KEY----- |
| π IP Addresses | 192.168.1.1 |
| π MAC Addresses | 00:1A:2B:3C:4D:5E |
| π US Addresses | 123 Main St, New York, NY 10001 |
| Entity Type | Examples |
|---|---|
| π€ PERSON | John Smith, Dr. Sarah Thompson |
| π’ ORGANIZATION | Acme Corp, Goldman Sachs |
| π LOCATION | New York, Silicon Valley |
Access via the extension popup β Open Settings
- PII Rules: Enable/disable detection for each type
- Block vs Warn: Choose blocking modal or warning banner
- Protected Sites: Manage which AI tools are protected
- AI Confidence: Adjust sensitivity threshold (0-100%)
- Behavior: Toggle real-time typing detection
- β
ChatGPT (
chat.openai.com,chatgpt.com) - β
Claude (
claude.ai) - β
Gemini (
gemini.google.com) - β
Copilot (
copilot.microsoft.com) - β
Poe (
poe.com) - β
Grok (
grok.com) - β
DeepSeek (
chat.deepseek.com)
src/extension/
βββ manifest.json # Chrome MV3 manifest
βββ background.js # Service worker (message routing)
βββ content-script.js # Page injection (paste/typing interception)
βββ offscreen.js # AI model execution environment
βββ offscreen.html # Offscreen document container
βββ lib/
β βββ transformer-detector.js # BERT NER model wrapper
βββ modules/
β βββ config.js # Regex patterns & constants
β βββ scanner.js # Detection orchestration
β βββ settings.js # Chrome storage management
β βββ event-handlers.js # Paste & input handlers
β βββ ui/
β βββ modal.js # Blocking modal component
β βββ banner.js # Warning banner component
β βββ styles.js # Shadow DOM styles
βββ ui/
βββ popup.html/js/css # Extension popup
βββ settings.html/js/css # Settings page
- Extension: Chrome Manifest V3, ES Modules
- AI Runtime: ONNX Runtime Web (WASM)
- Model:
Xenova/bert-base-NER-uncasedvia Hugging Face Transformers.js - UI Isolation: Shadow DOM (no CSS conflicts with host pages)
- β Send data to external servers
- β Log or store your text
- β Use analytics or telemetry
- β Make any network requests (except model download on first run)
- β Process everything locally in your browser
- β Cache the AI model locally after first download
- β Store settings in Chrome's encrypted sync storage
- β Provide fully auditable open-source code
Verify yourself: Open DevTools β Network tab. You'll see zero outbound requests during detection.
cd src/extension
npm install
node build.jsnode tests/content-script.test.js- Chrome 120+ (for Offscreen Documents API)
- Node.js 18+ (for building)
- Check DevTools console for errors
- The model (~50MB) downloads on first run β may take a minute on slow connections
- Try clearing extension data and reloading
- Check if the site is in your protected sites list
- Some sites use iframes β detection may be limited
- Open an issue with the site URL
- Adjust AI confidence threshold in settings
- Some patterns (like short names) may not be detected
- Report edge cases as issues
- Firefox/Safari support
- Custom regex patterns via settings
- Redaction mode (replace vs block)
- Export/import settings
- Keyboard shortcuts
- Enterprise policy support
PRs welcome! Please include:
- Browser version
- Steps to reproduce
- Expected vs actual behavior
MIT License β see LICENSE
Built for privacy. Runs locally. Open source.
Report Bug β’
Request Feature





