newmean-pii product facts
newmean-pii is an open-source SDK that finds and masks personal information in text inside the browser or on the device, so you can redact PII before sending a prompt to OpenAI, Anthropic or any other external API. In JavaScript it runs in WebAssembly, and the same models run on device in Python, iOS, Android and Flutter apps. The original text does not leave the user's device. It is made by newmean.ai, a two-person software company in Incheon, South Korea.
Facts at a glance
- What it does
- Detects personal information in text and masks it, for example “My email is kim@example.com” becomes “My email is [EMAIL]”. Masking can use a label tag, asterisks, removal or your own replacement.
- Languages
- 54 languages, one multilingual model.
- What it masks
- 11 labels: PERSON, EMAIL, PHONE, ADDRESS, ID_NUMBER, FINANCIAL, ORG, USERNAME, URL, DATE_OF_BIRTH and SECRET, plus two level-2 labels for indirect identifiers (PERSON_L2, URL_L2). An optional pattern layer (email, URL, card or account number, phone, Korean resident registration number) is off by default.
- Model sizes
- nano 2.6 MB, small 7.1 MB, medium 11.3 MB (default), large 15.5 MB, plus a 0.8 MB tokenizer shared by all sizes.
- Where it runs
- In the browser in WebAssembly, with the SDK's own engine (about 13 KB, the default) or onnxruntime-web. In Python, iOS, macOS, Android and Flutter through one shared C engine on the device. Also a Rust crate.
- Model files
- Downloaded once from Hugging Face and checked against SHA-256 values pinned in the package, or bundled with the app. In the browser they are kept in the Cache API, and you can serve them yourself.
- LLM integrations
- JavaScript: a Vercel AI SDK language model middleware and a LangChain.js agent middleware. Python: LangChain middleware, a LiteLLM proxy guardrail, a Presidio recognizer and a Langfuse mask function. None of these libraries is a dependency.
- Tables
- A table mode for CSV, TSV and markdown tables masks cell values and keeps the table valid.
- License
- Apache-2.0 for the SDK code and the model weights. Free for any use, including commercial use.
- Current version
- 1.6.1, released 17 November 2026 (on npm, 1.6.2 is the same code). Models v1.1.
- Developer
- newmean.ai (뉴민에이아이), a two-person software company in Incheon, South Korea.
Install
- JavaScript (browser, Node.js)
npm install @newmean-ai/pii- Python 3.9+
pip install newmean-pii- iOS 15+, macOS 12+ (Swift Package Manager, from 1.6.1)
https://github.com/newmean-ai/pii- Android 7.0+
implementation("ai.newmean:pii:1.6.1")- Flutter, Dart
flutter pub add newmean_pii- Rust
cargo add newmean-pii
Guides for each platform, the full API and accuracy results per dataset are in the GitHub repository.
Frequently asked questions
Does my text get sent to a server?
No. Detection runs in the browser in WebAssembly, or inside your app on the device. The only network use is downloading the model files once from Hugging Face, which are checked against pinned SHA-256 values. You can also serve the files yourself or bundle them with the app. The public demo at pii.newmean.ai sends only speed numbers and button clicks, not your text.
How do I mask PII before sending a prompt to OpenAI or Anthropic?
Call redact() on the text before you send it, or wrap your model with the Vercel AI SDK middleware from @newmean-ai/pii/ai-sdk, so the provider receives “Call [PERSON] on [PHONE]” instead of the name and number. In Python there is LangChain middleware and a LiteLLM guardrail. Masked values are not put back into the response, and no model finds everything, so this lowers what a provider sees rather than guaranteeing that nothing gets through.
What personal information does it detect?
Names, email addresses, phone numbers, addresses, ID numbers, financial numbers, organisations, usernames, URLs, dates of birth and secrets, plus indirect identifiers such as a surname with a title or a public profile URL. IP addresses are detected as ID numbers.
Which languages and platforms does it support?
54 languages. It runs in JavaScript (browser and Node.js), Python 3.9+, iOS 15+ and macOS 12+ through Swift Package Manager, Android 7.0+, Flutter and Dart, and Rust.
Is it free?
Yes. The SDK code and the model weights are Apache-2.0 and free for any use, including commercial use. The public test dataset is CC BY-NC 4.0.
How is it different from Presidio?
They run in different places. Presidio, a PII de-identification framework that started at Microsoft and is now a community project, is used from Python or PySpark, or deployed with Docker or Kubernetes. newmean-pii runs inside the browser or the app, so text can be masked on the user's device before it is sent anywhere. Its Python package also includes a recognizer for Presidio.