Team AER

Redact your prompt before the AI reads it.

PromptMask is a Chrome extension that swaps names, emails, IDs and keys for placeholders like [NAME 1], using Gemma on your own device. You check the result, then send.

  • Works on ChatGPT, Gemini, Claude, Perplexity and Grok.
  • Version 0.2.1, in private development. Not on the Chrome Web Store yet.
  1. Type as usual
  2. Enter redacts on your device
  3. Enter again sends

Sample data. Placeholders are tinted here for clarity; in the real composer they are plain text, and the whole message is replaced at once.

Seven kinds of detail, each with its own switch

Turn a category off and the model is never told it exists, so those values stay as you wrote them. Try the switches: they are the extension’s own popup, rebuilt.

What gets sent 8 details masked

Summarise this for the client file. Patient [NAME 1], MRN [MRN 1], wrote from [EMAIL 1] on [IP_ADDRESS 1]. She paid invoice [INVOICE_ID 1] with card [CREDIT_CARD 1], PAN [PAN 1]. Our billing script uses key [API_KEY 1].

Sample data. Illustrative output: a small model can miss or mislabel a value, which is why you review it before it sends.

The placeholders it may use

Identity & Contact
NAME PHONE EMAIL USERNAME ADDRESS DATE_OF_BIRTH
Government & Legal IDs
SSN PAN GST DRIVER_LICENSE
Financial & Payment
BANK_ACCOUNT CREDIT_CARD CARD_EXPIRY CARD_CVV PAYPAL
Medical
INSURANCE_ID MRN
Credentials & Secrets
API_KEY ACCESS_TOKEN
Network & Device
IP_ADDRESS DEVICE_ID
Business & Case References
ORDER_ID INVOICE_ID CASE_ID

Numbers count up per kind, and a repeated value keeps its number: the second time Priya Nair appears, she is still [NAME 1].

Four hops, all inside your browser

Chrome splits an extension into separate parts. A hidden offscreen document runs redaction locally on your GPU. The chat page can already read its composer, so this is a send-time review tool, not draft isolation from the host site.

  1. Your chat tab

    content_script.js

    Catches Enter or the Send click before the site’s own handler does, and holds it.

    LLM_PROMPT + your switches

  2. Service worker

    service_worker.js

    Tags the request with an id and passes it on. It keeps nothing, because Chrome can stop it at any moment.

    LLM_PROMPT + request id

  3. Offscreen document

    offscreen.js, on MediaPipe and WebGPU

    Builds a prompt that names only your enabled categories, and runs Gemma 4 E2B on your GPU.

    LLM_RESULT back the same way

  4. Back in your composer

    content_script.js

    Checks the output, writes it into the composer, and waits for your second Enter to let the site send it.

    You review, then send

  • Same prompt, same result

    Decoding is fixed: temperature 0, top-k 1 and a set seed, so a prompt redacts the same way every time.

  • One correction round

    If the model uses a tag you switched off, it is asked once more without it. A second miss is reported, not sent.

  • Your text is never lost

    If anything fails, from a download error to output that looks cut short, your original text goes back in the composer with a note saying why.

A 2 GB model, downloaded once

The first time you send with PromptMask on, it fetches Gemma from Hugging Face and keeps it in your browser. After that it loads from disk.

Model
Gemma 4 E2B, instruction-tuned, as a WebGPU .task file from litert-community on Hugging Face
Runtime
MediaPipe LLM Inference, its WebAssembly files bundled with the extension, running on WebGPU
Storage
The browser’s Cache API, with persistent storage requested. The browser can deny persistence or remove the cache, requiring a new download
First prompt
The download is split as it streams: one copy fills the cache, the other loads straight into the model

Gemma is provided under and subject to the Gemma Terms of Use and the Prohibited Use Policy.

The first time

Every time after

These are the extension’s own notices, word for word. They sit in the bottom-right corner of the chat page.

Local redaction, reviewed before sending

PromptMask changes what is in your message. Review the result: disabled categories and missed details remain. What you then send goes to the chat site as usual. Its page can access text in the composer before redaction.

  • No cloud model

    The extension runs redaction in a hidden offscreen document on your GPU; it does not send that inference request to a cloud model. Your chosen chat site receives the message you submit.

  • One download, and that’s it

    The extension’s own pages are locked by their content security policy to connect only to Hugging Face, for the model.

  • Local cache and diagnostic logs

    The extension stores switches, model status and model files, rather than a prompt-history database. The current development build logs framed prompts and model outputs to extension DevTools; those logs can contain sensitive text.

  • Three permissions

    offscreen, storage and unlimitedStorage, plus access to the five chat sites and to Hugging Face. Nothing else.

A helper, not a guarantee

  • It’s a small model

    Gemma 4 E2B is small enough to run in a browser tab, and it can miss a detail or pick the wrong label. That’s why PromptMask shows you the result and waits for you.

  • It isn’t legal advice

    It is a redaction helper, not a substitute for legal, medical, financial or other professional services. Review what it gives you before relying on it.

  • What you need

    Chrome or another Chromium browser with WebGPU, and about 2 GB of disk for the model.

Try it before it reaches the store

PromptMask is built by Nidhi Bharani for Team AER. The repository is private and the extension isn’t on the Chrome Web Store yet, so ask and tell us where you’d use it.