Protects your privacy when you use AI. mask2ai keeps personal data on your machine when you work with an AI assistant. It detects names, contact details, identity numbers, payment details and addresses in what you send, replaces them with placeholders before anything leaves your device, and puts the real values back on your screen.
plugin, six hooks, PDF to text, image redaction (macOS natively, Linux with poppler, tesseract and ImageMagick)
node test.js, node demo/prove.js
claude.ai in Chrome
extension on the Chrome Web Store, chat text and Office or text uploads
node demo/verify-web.js
ChatGPT web (chatgpt.com) in Chrome
extension, chat text
node demo/verify-web.js
Demos
Claude Code
The real Claude Code terminal with the plugin loaded. The first prompt is blocked and a masked copy is offered. The masked prompt goes through, Claude reads a CSV, the plugin masks 13 values in the tool output before the model sees it, and the model's reply comes back with placeholders that the plugin restores on screen. The model replies in this recording come from demo/fake-api.js, a local stand-in for the Anthropic API, so the recording does not depend on an account. The CLI, the hooks and the masking are real.
Files in Claude Code
One prompt reads the sample PDF and the sample image. The PDF read is redirected to a masked text extraction, the image read to a redacted copy, and the reply shows what the model was given. The values in the reply are placeholders restored on screen.
The redacted copy is real output: demo/customer-redacted.png is what the Read tool received in the recording above. Words that match personal data are found by Apple Vision OCR and blacked out in the pixels. The original file is untouched.
ChatGPT web
A real chat on chatgpt.com in Chrome with the extension loaded. The purple captions are added by the recorder. The text under "what ChatGPT actually received" is the prompt field captured from the outgoing request.
What is detected
Type
How it is found
Validation
Email address
pattern
Phone number
international +.., US, UK and Turkish formats
Payment card
13 to 16 digit shapes, spaced or plain
Luhn
IBAN
country code plus grouped alphanumerics
mod 97
Turkish ID number (TC Kimlik No)
11 digits
official checksum
US Social Security number
ddd-dd-dddd
Date of birth
after a label such as DOB, date of birth, doğum tarihi
Passport or ID number
after a label such as passport no, kimlik no, ehliyet
Turkish licence plate
34 ABC 123
Public IPv4 address
excludes private, loopback and link-local ranges and version strings
Person name
after a title (Dr., Sayın), a cue (my name is, Regards,, Benim adım), a label (name:, "firstName":), or derived from a masked email (jane.doe@ also hides Jane and Doe)
shape check
Street address
after a label (address:, adres:), US and UK street shapes, Turkish Mah. / Cad. / Sok. shapes with No:
shape check
Detection is pattern based and works in English and Turkish. Structured identifiers are matched reliably. Names and addresses are matched when there is a signal around them: a label, a title, a cue or a matching email. A bare name in free text with none of these passes through, and semantic facts such as health, religion or income are not detected. See Limits.