Skip to contentRedact PII for your data. Get a quote

How it decides

How a match is decided

A value is masked only when something in the text confirms it. A number that merely looks like an ID is not enough.

Three possible outcomes

Every value the engine finds ends one of three ways. Each example is its real output in Fast mode, the default.

  1. Masked as its type

    A checksum, a label or a format confirms the value. The placeholder names the type.

    • In
      Card number: 4539 1488 0343 6467
      Out
      Card number: CARD1
    • In
      PESEL 44051401359
      Out
      PESEL PL_PESEL1
  2. Masked and flagged unverified

    The label and shape fit, but the checksum fails, often because of a typo. The value is still masked. For most formats its placeholder ends in _UNVERIFIED, so a reviewer can check it.

    Cards, IBANs, IMEIs, secrets and some company IDs keep their kind, as in CARD_UNVERIFIED. A national ID or tax number falls back to ID_UNVERIFIED. A few formats, such as the Spanish DNI, keep their own placeholder with no flag: see Known limits below.

    • In
      Card number: 4539 1488 0343 6468
      Out
      Card number: CARD_UNVERIFIED1
    • In
      Card: 4111 1111 1111 1112
      Out
      Card: CARD_UNVERIFIED1
  3. Kept as written

    Nothing confirms that the value identifies a person, so it stays as written. Looking like a card number is not enough.

    • In
      Batch 4539 1488 0343 6468 passed QA.
      Out
      Batch 4539 1488 0343 6468 (kept as written) passed QA.
    • In
      Order 48213-77 shipped on 03/02/2024 for $1,240.00.
      Out
      Order 48213-77 (kept as written) shipped on 03/02/2024 (kept as written) for $1,240.00 (kept as written).

What counts as evidence

A value is masked only when the engine finds one of these four. Fast uses the first three; Full also uses the model.

Checksum
The check digits add up, so a mistyped or made-up card, IBAN or ID number fails.
Official label
The number's official name in the text, in the local language and script, such as Steuernummer or PESEL.
Format
A layout that identifies the value on its own: emails, phones, addresses, profile links, provider keys.
The model, in Full
A small local model judges ID- and address-shaped values that no rule confirmed, and finds people's names and organisations in running text. It runs on your machine.

The model and its training data

Full's model and the data we wrote to train it are public on Hugging Face. No text from PIIMark or PrivacyBench was used in training.

  • The model ↗

    BUSL-1.1, same as the engine

    One XLM-RoBERTa-base network, int8 ONNX, used by Full only: a judge for values no rule confirmed and a tagger for people's names and organisations. The engine downloads it once and checks every file's SHA-256.

  • Synthetic messages ↗

    177,366 records · 34 languages · CC BY 4.0

    Chat threads, emails, documents and table exports built from templates we wrote, with names, organisations and places from Wikidata and GLEIF, labelled by construction.

  • Casual chat ↗

    59,976 records · 7 languages · CC BY 4.0

    Slack-style workplace threads: lowercase names, first names only, @handles, nicknames and “which Anna? we have two”.

  • LLM workplace chat ↗

    54,807 records · 7 languages · CC BY 4.0

    Chats, emails and support conversations across 40 industries, written by gpt-oss-20b run locally, with names from Wikidata and GLEIF filled in afterwards.

  • Case-augmented names ↗

    50,602 records · CC BY 4.0 and Apache-2.0

    Records from public PII datasets (OpenPII, Nemotron-PII, Gretel, MAPA) lowercased or wrapped in a greeting and sign-off, each keeping its source's licence.

  • Training recipe ↗

    the exact mixture

    How often each source was sampled, a hash of every training file, the code that built the data, and the overlap filter against every evaluation set, PIIMark and PrivacyBench included.

Kept on purpose

Some values look sensitive but say nothing about a person. Ordinary dates, ticket and order numbers, amounts, example keys from documentation, and server and private IPs stay as written.

Date
The invoice is dated 14/09/2023.
Ticket
Ticket 2024-118734
Amount
total €129.90
Docs key
AWS docs example: AKIAIOSFODNN7EXAMPLE
Server IP
The server listens on 10.0.0.12.

Each line above comes back unchanged in Fast mode.

Known limits

No detector is perfect. These are the limits we know of, with the library's real output.

  • A few formats are not yet caught in every way people write them. We're adding more.

  • A number can pass another country's checksum and get that country's placeholder. It is still masked.

    In
    Partita IVA 01234567890
    Out
    Partita IVA BR_CPF1
  • A failed checksum does not always show in the placeholder. This DNI has a wrong check letter and is still masked as a DNI.

    In
    DNI 12345678A
    Out
    DNI ES_DNI1

The two modes

Fast is the default, and every example on this page uses it.

FastDefault
Rules only: checksums, labels and formats. No model is loaded. People's names are found only where the text labels them.
Full
Adds the local model: it judges numbers, codes and street names no rule confirmed, and finds people's names and organisations in running text.