Tokenization vs. Pseudonymization vs. Anonymization

Three terms are used almost interchangeably in marketing copy and mean meaningfully different things under GDPR, HIPAA, and CCPA. Getting the distinction wrong is a governance problem: calling a dataset "anonymized" when it is in fact "pseudonymized" triggers a different regulatory regime, different breach obligations, and a different audit surface.



1. The Taxonomy at a Glance

Technique Reversible? Trust locus Still "personal data"?
Tokenization (vault) Yes, via vault Vault operator Yes
Pseudonymization (keyed) Yes, via key Key holder Yes
Anonymization No (irreversible) No — if truly irreversible

2. Tokenization

Replace a sensitive value with an opaque random token; store the token→plaintext mapping in a secured vault. The token carries no information about the plaintext by itself; reversal requires vault access.

Covered in detail on the PII redaction page, §5.


3. Pseudonymization

Replace the sensitive value with a deterministic derivative — a keyed HMAC, an FPE ciphertext, or an encrypted value — where reversal or linkage requires the key.

import hmac, hashlib

def pseudonymize(plaintext: str, key: bytes, field: str) -> str:
    # Include the field name so "123" as SSN != "123" as account number.
    msg = f"{field}:{plaintext}".encode()
    return hmac.new(key, msg, hashlib.sha256).hexdigest()[:16]

4. Anonymization

Transform the data so that re-identification is infeasible for any party, including the data controller, under any reasonable set of resources. This is a much stronger claim than "we threw away the key." Under GDPR Recital 26, the test is whether identification is possible "by means reasonably likely to be used" by anyone — accounting for technical progress, available auxiliary data, and motivated adversaries.

If you hold the key, the dataset is not anonymized. Pseudonymization and key destruction can approach anonymization only if the key is truly destroyed and no quasi-identifier linkage remains.


5. GDPR Treatment


6. Choosing the Right One


↑ Back to Top