Your data stays yours.
PromptShield is a Chrome extension that catches sensitive personal information in your AI chat messages before you accidentally send it. It intercepts your prompt, highlights what it found, and lets you choose what to hide — all locally, with zero data leaving your browser.
- Type a message in any supported AI chat
- Press Send or Cmd/Ctrl+Enter
- If PII is detected, PromptShield shows a review modal
- Click any highlighted item to toggle it on/off
- Send with redaction, send as-is, or cancel
That's it. No accounts, no servers, no learning from your data.
| Type | Example |
|---|---|
| john@example.com | |
| Phone | 415-555-1234 |
| Credit card | 4111 1111 1111 1111 (Luhn-validated) |
| SSN | 123-45-6789 |
| IP address | 192.168.1.1 |
| API keys | GitHub PATs, AWS AKIA keys, Stripe keys, JWTs |
| Crypto wallets | Bitcoin, Ethereum addresses |
| Passport numbers | A12345678 |
| URLs | https://example.com |
| Dates | 08/15/1990, 15th August |
| Street addresses | 123 Main Street, New York NY 10001 |
| Names (optional) | Heuristic — "my name is Jane" |
Claude.ai · ChatGPT · Gemini · Perplexity · Copilot · Poe · You.com · HuggingFace · Mistral · LMSYS
- 100% local — all detection runs in your browser via regex patterns
- No storage of PII — matches are held in memory only for the duration of the modal
- No network requests — the extension never phones home
- Closed Shadow DOM — the modal is isolated from page JavaScript so the host site cannot read pill content
- No learning — nothing is used to train any model
git clone https://github.com/gmuskan95/PromptShield.git
cd PromptShield
npm install
npm run buildThen in Chrome:
- Go to
chrome://extensions - Enable Developer mode (top right)
- Click Load unpacked → select the
dist/folder
Click the toolbar icon to access:
- Site toggle — enable/disable PromptShield per site instantly
- Detect names — heuristic name detection (may have false positives)
- Redaction style — how replaced values appear:
- Generic:
[EMAIL] - Numbered:
[EMAIL_1] - Hashed:
[EMAIL_a3f9c1]
- Generic:
- Theme — Light, Dark, or Auto (follows system)
src/
├── detector-core.ts # PII patterns, Luhn validation, confidence scoring
├── contentScript.ts # Intercept logic, Shadow DOM modal, per-site selectors
├── popup.ts # Popup + options UI logic
└── background.ts # Service worker (minimal)
icon.svg # Source icon — auto-converted to PNG at build time
build.js # esbuild + sharp bundler
manifest.json # MV3 manifest, scoped host permissions
npm run build # compile TypeScript + generate icons → dist/
npm test # run 44 unit tests (vitest)Given the input email me at john@example.com:
| Style | Output |
|---|---|
| Generic | email me at [EMAIL] |
| Numbered | email me at [EMAIL_1] |
| Hashed | email me at [EMAIL_a3f9c1] |
MIT — see LICENSE for details.
PromptShield catches many common PII patterns but cannot guarantee 100% detection. Always review your prompts before sending sensitive information to any AI service.