Ai4Privacy.
Menu

Detect and mask PII across your AI workflow

Find personal information in your text and replace it with placeholders. Ai4Privacy gives you the synthetic datasets, the browser-based chat, the REST API and the local SDKs to do it.

Inspect one verified OpenPII 1M row

Verified synthetic record · Hugging Face

View source on Hugging Face

Original synthetic record · exposed fields underlined

The set design, inspired by a miniature garden at Rectory Road 653 in Hungerford Kintbury, reflects the intimate scale of bonsai art.

One verified synthetic record from Ai4Privacy’s OpenPII 1M dataset. The interaction changes the view; it does not generate or modify the record.

Four ways to use Ai4Privacy

Training a model, working with prompts, shipping a product or running it locally. Compare all products, then choose the path that matches the work in front of you.

Choose a dataset release

Use synthetic, multilingual records for training and evaluation without introducing real personal data. Compare releases by scale, coverage, license and best fit.

Scale
2M+ rows
Coverage
32 locales · 98 entities
License
CC-BY-4.0 + Enterprise
Best fit
European training and evaluation
Scale
1M series
Coverage
11 regions
License
CC-BY-4.0 open core
Best fit
Open-core model training
Scale
400K+ largest release
Coverage
6 languages · 17–54 entities across the series
License
Ai4Privacy Dataset and Derivative Products License
Best fit
Comparing smaller release sizes

Use PII masking directly

Mask sensitive text before it reaches AI chat

Ai4Privacy Chat masks personal information in the browser before prompts are sent.

Ai4Privacy ChatSynthetic example
You

Draft a reply to [NAME_1] about order [ORDERNUMBER_1].

AI

Of course. What would you like the reply to say?

2 fields masked locally

Add PII detection and masking to your product

Call the REST API for detection, redaction, synthetic identities and privacy-aware chat.

InputMaya Chen
HostedREST API
Output[NAME_1]
A product sends text to the hosted REST API and receives detected or masked text.

Run PII detection locally

Install the Python or JavaScript package and run detection inside your own application.

Terminal
pip install ai4privacy npm i @ai4privacy/ai4privacy
PythonJavaScriptRuns locally

Build a masking pipeline you can explain

Learn how to define entity types, prepare training data, evaluate models and apply masking decisions consistently.

PII Masking for AI Training Data: A Practitioner’s Guide

PII masking for AI training data is the process of finding personal data in a text corpus and replacing it, so that less identifiable information is carried into a model’s weights.

Read the practitioner’s guide
DefineInventoryChoose the personal-data types that matter.
FindDetectLocate each personal span in context.
ProtectReplaceKeep useful language around the placeholder.

Explore the complete guide set

PII Annotation Guidelines: Labeling Personal Data for NER Training

Read the annotation guide
False negative

Email maya@example.org today.

PII left exposed
False positive

Ship the [DATE_1] release.

Useful context removed
Two model-evaluation failure modes: a false negative leaves an email address exposed; a false positive masks the word May when it describes a software release.

How to Evaluate a PII Detection Model: Precision, Recall and What They Miss

Read the evaluation guide

A shared language for personal data

p5y is Ai4Privacy’s open framework for describing personal and sensitive data. It is inspired by i18n and l10n.

English (en-US)

Ms. North, our office in Essex confirmed your visit with a health psychologist at 10:02 AM.

p5y redacted English (en-US-P)

[TITLE_1] [NAME_1], our office in [COUNTY_1] confirmed your visit with [MEDICAL_PROFESSIONAL_1] at [TIME_1].

Privacy masking treated as a translation task. Adapted from the p5y framework diagram.
  1. 01
    AwarenessDescribe what personal data is present.
  2. 02
    ProtectionApply a shared protection vocabulary.
  3. 03
    Quality assuranceCheck the result consistently.
Read the p5y specification

Questions before you choose a path

Still deciding?Talk to us
What does Ai4Privacy do?

Ai4Privacy helps teams find personal information in text and replace it with placeholders. The same workflow is available through synthetic datasets, a browser-based chat, a REST API and local Python and JavaScript SDKs.

Do the training datasets contain real personal data?

The datasets presented here use synthetic PII rather than real personal data. Each release has its own coverage, access and license details, so those facts should be checked on the individual release page.

Can PII detection run inside my own application?

Yes. The Python and JavaScript packages are designed for local execution inside your own application or workflow. The REST API is the separate hosted integration path.

Which dataset release should I choose?

Start from the region and languages your text is in. The Asia-Pacific and European releases are built for those regions, the 1M series is the open-core option, and the 400K series and below are smaller sets useful for comparing release sizes. Each release page lists its own coverage, access and license details.

How are the dataset releases licensed?

Each release states its own license. The 1M series is CC-BY-4.0 open core. The 3M and 2M releases are listed as CC-BY-4.0 + Enterprise. The 400K series and below use the Ai4Privacy Dataset and Derivative Products License. The individual release page is the authority for what each of those permits.

REST API or local SDKs — which should I use?

The REST API is hosted: your product sends text and receives detected or masked text back. The Python and JavaScript packages run inside your own application instead. Choose the packages when you want detection to run in your own environment, and the API when you would rather not run it yourself.

Start with our open-source work

The datasets are on Hugging Face, the projects are on GitHub, and the packages install from PyPI and npm.

If you are evaluating Ai4Privacy for your company, talk to us about access and integration.