On-Device vs Upload: Why "we delete it after 24h" Is Not a Guarantee

← PII Shield · All guides

The core promise of PII Shield is architectural, not procedural: the document is parsed, scanned and masked inside the browser tab you opened. There is no upload step to be careless with.

What "on-device" actually means here

Everything runs as JavaScript in your tab. For the machine-learning layer, a quantized model (~66 MB) is downloaded once from a public CDN (Hugging Face) and executed locally through transformers.js / WebAssembly. The model weights are public and content-free — nothing about your document travels with them.

The boundary, proven

The persona test suite (tests/e2e/run.mjs) asserts, in the deployed site, that no network request occurs while scanning and masking. That is the difference between a policy ("we delete after 24 hours") and a mechanism ("nothing was sent, and the test that fails if that ever changes is in the repo").

Where the model download is the exception

One exception exists and it is bounded: the first time you use the name layer, the model is fetched. The request is for model weights only. To make even that safe from CDN Referer handling, the fetch is issued with no Referer — Hugging Face returns 404 to requests carrying a *.workers.dev Referer, a measured behaviour handled on the request side (code comment in js/ner-model.js).

The honest limits of "local"

On-device means your browser executes the logic — it does not mean your machine is compromise-proof. Malware on the device, a hostile browser extension, or a screen-sharing session in progress can read anything you paste, no tool can prevent that. The guarantee here is narrower and real: nothing about your document travels because of this tool. Pair it with the basics — paste into a window you trust, and close a screen-share before opening anything sensitive.

What the network log shows

Open your browser's dev tools on the network tab and use the tool. While you paste, group, tick and mask, you will see zero new requests. The first time you enable name detection, one request fetches the model weights from a public CDN (with no Referer — see the note in the source); after that it is cached and the log stays empty again. That is the entire footprint, and the persona test suite asserts it stays exactly that way on every deploy.

What this means for teams

The pattern that scales is "mask at the source": whoever holds the document masks it before it enters a chat, ticket or data-export pipeline, using a tool whose masking can be verified. Downstream systems then never hold the raw identifiers, which shrinks every future leak surface at once — a breach of the downstream system becomes an incident about tokens, not about people. Centralised redaction does the reverse: it concentrates all identifiers in one service and makes that service everyone's single point of failure.

When you actually want to upload

On-device tools have limits — a 4 GB PDF will be slow, a 5-minute video will not fit in memory. Upload services trade exposure for scale. The right question is not "which tool is nicer", but "who sees this document if I use it?" If the honest answer is "a server I do not control", choose the slower tool whose answer is "nobody".

Everything on this page runs in your browser — open PII Shield and paste the document you are about to send.