@newmean-ai/pii: browser-side PII redaction with four multilingual models
A library that finds and masks personal information like names, emails, phone numbers, addresses and IDs, running its detection models on the user's device in WebAssembly.
According to its README, @newmean-ai/pii detects and masks personal information such as names, emails, phone numbers, addresses and IDs. It runs entirely in the browser, so the original text never leaves the user's device. The library covers 54 languages with 11 labels, plus two level-2 labels for indirect identifiers. An optional pattern layer for emails, URLs, cards and similar items is off by default. Four model sizes are available, from nano at 2.6 MB to large at 15.5 MB, with medium at 11.3 MB as the default. The README says the code and model weights are Apache-2.0 and free for any use, including commercial use.
Install it with npm install @newmean-ai/pii. The same models ship for Python, iOS, Android, Flutter and Rust through one C engine, which the author says gives identical token ids and logits to the npm package. A call to createRedactor with size medium turns "My email is kim@example.com" into "My email is [EMAIL]". Table mode reads CSV and TSV as one text, masks whole contact columns and keeps the table valid. Adapters for LangChain, LiteLLM, Vercel AI SDK, Microsoft Presidio and Langfuse mask what is sent or stored, but the README says they do not put values back into a response. Model files are downloaded from Hugging Face and checked against pinned SHA-256 values, or bundled with the app.
The README's own results table, which the author ran on a public test set and four external datasets, shows the large model missing 1.6% of PII characters on the public test and 9.6% on the Korean KDPII set. Miss rates rise for the other detectors listed. The author notes that the public test uses the same kind of data the models were trained on. The training data is available only by request, free for research and by inquiry for commercial use. The public test dataset is CC BY-NC 4.0.
In the author's words
Four model sizes: **nano 2.6 MB**, **small 7.1 MB**, **medium 11.3 MB** (default), **large 15.5 MB**
From the README or the author's post. We checked that the sentence is there, not that it is true.
When to reach for it
Teams can use it to mask personal data before text reaches a hosted model or trace store, which matters most when text must stay on the browser or device. The LangChain and Vercel AI SDK adapters are the quickest way to try it inside an agent.
Works with
See it
AI wrote this entry from the project's own README or its author's post. What the project does, and that AI built it where the entry says so, are the author's statements, quoted here. Nobody at IKANGAI ran or tested it. How this list is made