Ai4Privacy.
Menu

Detect and mask PIIacross your AI workflow

Find personal information in text and replace it with consistent placeholders.

  1. 01Raw textInput as received

    On 12 March 2024, John Smith
    visited 123 Wall St, New York
    and paid $1,250.00 on his
    company card.

  2. 02Detected entitiesPII spans identified

    On 12 March 2024, John Smith
    visited 123 Wall St, New York
    and paid $1,250.00 on his
    company card.

  3. 03Protected outputPII replaced with placeholders

    On [DATE_1], [GIVENNAME_1]
    [SURNAME_1] visited [STREET_1],
    [CITY_1] and paid [AMOUNT_1]
    on his company card.

Evidence you can inspect

The records are synthetic, the labels are visible and each dataset release states its own coverage, access and license.

PII Masking 3M

Synthetic dataset
Scale
3M+ rows
Coverage
30 languages · 3 regions
Labels
mBERT-compatible BIO
Data
Synthetic PII only

On 12 March 2024, Elena Rossi booked a flight from Milan Malpensa Airport to Paris Charles de Gaulle for 2 guests, departing at 07:15.

Built for the messy parts of ML data

Coverage, labels and evaluation slices are visible before you choose a release.

PII Masking 3M spans 30 languages across three regions. Its collection includes 20 core entity types and 61 industry-specific types, with pre-computed mBERT-compatible BIO labels.

PII Masking 3M coverage30 languages across 3 regions
01EuropeSynthetic multilingual records
02AmericasSynthetic multilingual records
03Asia-PacificSynthetic multilingual records
No real personal dataCollection-level coverage
30
languagesAcross three regions
20 + 61
entity typesCore and industry-specific
BIO
model-ready labelsmBERT-compatible
100K · 10K · 1K
benchmark slicesEvaluation and smoke tests

Use it wherever your data lives

Mask a prompt in the browser, connect a hosted API or run detection inside your own application.

Protect a prompt before it is sent

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

Open Ai4Privacy Chat
Ai4Privacy Chat Browser protection active
Protected message

Draft a reply to [NAME_1] about order [ORDERNUMBER_1] and send it to [EMAIL_1].

Personal fields are replaced before the prompt is sent.

Build a masking pipeline you can explain

Define the policy, evaluate detection and apply masking decisions consistently.

Ai4Privacy practitioner guideExplainable PII masking

PII Masking for AI Training Data

A practical method for moving from entity policy to evaluated protection.

  1. 01

    Define

    Set the entity taxonomy and annotation policy for your context.

  2. 02

    Detect

    Evaluate spans, confidence and errors against labelled examples.

  3. 03

    Protect

    Apply consistent replacements while retaining useful structure.

Continue with the method

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

Read the evaluation guide
Browse all guides

One language across the privacy pipeline

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

Explore p5y
Dataset annotations
PERSONRina Patel

The training data names the entity type.

Model output
start 0end 11PERSON

The detector returns the same category.

Masking rule
[PERSON_1]

The replacement keeps a stable, readable label.

Evaluation
PERSONPrecision · Recall

Errors can be reviewed by entity type.

Questions ML teams ask us

Short answers about data, deployment and licensing.

Still deciding? Tell us what you are building

01What does Ai4Privacy do?

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

02Do the training datasets contain real personal data?

The datasets presented here use synthetic PII rather than real personal data. Check the individual release page for its coverage, access and license details.

03Can PII detection run inside my own application?

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

04Which dataset release should I choose?

Start from the region and languages in your text. The Asia-Pacific and European releases focus on those regions, the 1M series is the open-core option, and the 400K series and below support comparisons at smaller release sizes.

05How 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 plus Enterprise. The 400K series and below use the Ai4Privacy Dataset and Derivative Products License.

06Should I use the REST API or local SDKs?

Choose the local packages when detection needs to run in your own environment. Choose the hosted REST API when your application should send text and receive detected or masked text back.

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.

15M+ downloads on Hugging Face