PII masking replaces or hides personally identifiable information — names, account numbers, national ID numbers, contact details — so data can be analysed, shared or sent to an AI model without exposing the people in it. It ranges from irreversible anonymisation to controlled, reversible pseudonymisation.
Also called: PII data masking, data masking, pseudonymization, pseudonymisation, anonymization
Personal data turns up in places nobody planned for: a customer name in a free-text comment, an IBAN in a ticket, a national ID number in an exported spreadsheet. PII masking is the control that keeps those values out of places they should not be — a report sent to a wider audience, a test environment, a file shared with a vendor, or a prompt sent to an AI model provider.
The methods differ in what they preserve. Redaction removes a value entirely. Substitution replaces it with a token such as <<PERSON_7f3a>>. Generalisation keeps a coarser version — a birth year instead of a date, a region instead of an address. Hashing produces an irreversible fingerprint. When the tokens are deterministic — the same name always becomes the same token — counts, joins and group-bys still give correct results on masked data, which is what makes masking compatible with real analysis.
The legal distinction matters. Under GDPR, anonymised data that can no longer be linked to a person falls outside the regulation. Pseudonymised data — where a protected key or mapping can restore the real values — is still personal data, but pseudonymisation is explicitly recognised as a safeguard that reduces risk. Most business analytics needs pseudonymisation, because someone eventually has to act on the result for a real customer. This is a summary, not legal advice.
A worked example: a bank wants an AI model to classify ten thousand customer complaints by topic and sentiment. The comments contain names, account numbers and phone numbers. Masking runs first, on the bank's own machine: column rules mask the known personal fields, and value detectors catch IBANs, card numbers and e-mail addresses written inside free text. The model receives tokens and returns categories. The tokens are restored locally, so the analyst sees the original rows with their new labels — and the provider never received a single real identifier.
The pitfalls are mostly about coverage. Masking only the obvious columns misses personal data inside free text. Relying only on pattern detection misses names, which follow no pattern — which is why column rules should be the control that holds and detectors a second net. Random, non-deterministic tokens break joins. Unmasking on a server re-creates the exposure masking was meant to prevent. And masking that is configured by hand per report drifts; it belongs in the pipeline, versioned like everything else.
ATX AnalyticsTable applies masking in reporting and export pipelines and on every call its AI analyst, Ask Greg, makes to a model: column rules first, then value detectors, then deterministic pseudonymisation, with tokens restored locally in the answer.
Frequently asked questions
What is the difference between masking and anonymisation?
Masking is the general practice of hiding or replacing personal values. Anonymisation is the irreversible kind: the data can no longer be linked to a person by anyone. Pseudonymisation is the reversible kind, where a protected mapping can restore the original values.
Is pseudonymised data still personal data under GDPR?
Yes. Because the original values can be restored with additional information, pseudonymised data remains personal data, but GDPR recognises pseudonymisation as a safeguard that lowers risk.
Why mask data before sending it to an AI model?
Because whatever is in the prompt leaves your control. Masking first means the model provider receives tokens instead of names, account numbers or ID numbers, while you can still restore the real values locally in the answer.
Does masking break analysis?
Not if it is deterministic. When the same value always becomes the same token, counts, joins and group-bys give the same results on masked data as on the original.
This site needs JavaScript for the full experience. Every page above is reachable without it.