Ai4Privacy.
Menu

Detect and mask PIIacross your AI workflow

Find personal information in text and replace it with consistent placeholders while keeping the surrounding data useful.

  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.

Built for the messy parts of ML data

Coverage, labels and access terms are visible before you choose a release.

Select a release to inspect

Coverage
30 languagesAcross 3 world regions
Taxonomy
20 core + 61Industry-specific entity types
ML format
BIO-labelledPre-computed, mBERT-compatible
Access
Open + EnterpriseCC-BY-4.0 open, Commercial License for enterprise
Inspect release
Coverage
32 localesEuropean release
Taxonomy
19 core + 79Industry-specific entity types
ML format
BIO-labelledPre-computed, mBERT-compatible
Access
Open + EnterpriseCC-BY-4.0 open, Commercial License for enterprise
Inspect release
Coverage
23 languagesEuropean release
Taxonomy
19 coreEntity types
ML format
BIO-labelledPre-computed, token classification
Access
OpenCC-BY-4.0, enterprise data licensed separately
Inspect release
Coverage
6 languagesAcross 5 releases
Taxonomy
17 public classesUp to 54 extended
ML format
BIO-labelledPre-computed, token classification
Access
Custom licenseStated on each of the 5 releases
Inspect release
Browse all datasets

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 data in the browser, so the prompt that reaches an external AI service no longer carries it.

In your browser

Your promptText you are about to send
Ai4Privacy ChatPersonal data is masked here
External AI serviceReceives the protected prompt
Your prompt and Ai4Privacy Chat both sit inside your browser; personal data is masked there, and only the protected prompt leaves for an external AI service.

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

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.

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.

Explore p5y

Questions ML teams ask us

Short answers about data, deployment and licensing.

What does Ai4Privacy do?

Ai4Privacy helps teams find personal information in text and replace it with placeholders. The workflow is available through synthetic datasets, Ai4Privacy 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. Check the individual release page for its coverage, access and license details.

Can 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.

Which 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.

How are the dataset releases licensed?

Each release states its own license, so check the release page before you build on it. The 3M and 2M releases come in two tiers: the open datasets are CC-BY-4.0 and the enterprise datasets need a commercial license. The 1M release is open under CC-BY-4.0, with enterprise data licensed separately. The 400K series and below use a custom license — for the 400K release that is the Ai4Privacy Dataset and Derivative Products License.

Should 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.

Still deciding? Tell us what you are building

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