โ† All models

token-classification ยท text ยท WASM ยท ~143 MB

PII detection & redaction โ€” scrub personal data locally

Paste a message, a support ticket, or a log line and the model tags every piece of personal data โ€” names, emails, phone numbers, cards, IBANs, crypto wallets, SSNs, passwords, IP addresses and street addresses across 60 categories. Flip the Redact switch to replace each with a [CATEGORY] placeholder and copy a clean version โ€” useful before you share, log, or paste text into another tool. Every byte stays on your device.

At a glance

Modelphatvo/deberta_finetuned_pii-ONNX (ONNX build of lakshyakh93/deberta_finetuned_pii)
Task / pipelinetoken-classification
Categories60 PII types, BIO-tagged (EMAIL, PHONE_NUMBER, CREDITCARDNUMBER, IBAN, BITCOINADDRESS, SSN, PASSWORD, IP, STREETADDRESS, FIRSTNAME/LASTNAME, DATE, โ€ฆ)
ArchitecturemDeBERTa-v3 base fine-tuned for PII NER
Quantizationq8 (8-bit) ONNX โ€” verified to match fp16/fp32 detection
BackendWebAssembly (runs anywhere; no WebGPU needed)
Download~143 MB, cached after first load
LicenseMIT (base model lakshyakh93/deberta_finetuned_pii)
Web APIsWebAssembly, Web Workers โ€” all Baseline widely available

Run it

Type or paste text. Personal data lights up a moment after you stop typing; hover a highlight for its category and confidence. Turn on Redact to mask it and copy the clean text.

See inside โ€” the per-token BIO tags

The model doesn't see "jordan.mitchell@gmail.com" as one thing โ€” it tags each sub-word token independently: B-EMAIL (begin email), I-EMAIL (inside email), and so on. We stitch consecutive B-/I- runs into whole values, map them back to the exact characters in your text, and trim stray punctuation so a redaction masks the value โ€” never half of it. Below are the raw tags straight from the model.

Use-case ladder

Why it matters

Detecting personal data on the device means you can scrub it before it ever leaves โ€” no server sees the raw text. That is exactly the property you want for redaction: the sensitive value never has to be transmitted to be found.

It's a best-effort model, not a guarantee: categories can be approximate (a card number may read as ACCOUNTNUMBER, an IBAN as MASKEDNUMBER), several numbers packed right next to each other can get split or mislabelled, and no detector catches everything โ€” treat it as a strong first pass, then have a human confirm before relying on the redaction.

How the API works

Token classification is one pipeline call:

import { pipeline } from "@huggingface/transformers";

const pii = await pipeline("token-classification", "phatvo/deberta_finetuned_pii-ONNX");
const out = await pii("email me at sam@acme.io");
// โ†’ [{ entity: "B-EMAIL", word: "โ–sam", score: 0.99, index: 4 },
//    { entity: "I-EMAIL", word: "@",   score: 0.99, index: 5 }, โ€ฆ ]

The pipeline returns one BIO-tagged row per sub-word token, but no character offsets. We map each token back to its span in the original text (a cursor-walk), merge B-/I- runs into whole values, and trim wrapping punctuation. It all runs in a Web Worker so typing stays smooth.

References