Tokenisation vs Encryption vs Masking for Personal Data
How tokenisation, encryption, masking and hashing differ, what each protects against, and how to choose the right one for personal data in your systems.
When teams decide to protect personal data, the same four words come up: encryption, tokenisation, masking and hashing. They are often used interchangeably, but they protect against different things. Choosing the wrong one can leave data exposed while giving everyone a false sense of security.
The short version
| Technique | What it does | Can it be reversed? | Best for |
|---|---|---|---|
| Encryption | Scrambles data with a key | Yes, with the key | Data at rest and in transit |
| Tokenisation | Replaces data with a stand-in token | Yes, through the vault | Keeping real values out of most systems |
| Masking | Hides part of a value from view | Display masking, yes. Static masking, no | Screens, reports, test data |
| Hashing | Turns data into a fixed fingerprint | Not directly | Matching and de-duplication |
Encryption
Encryption turns readable data into ciphertext using a key. Anyone with the key can turn it back.
What it protects against: someone who gets the stored data but not the key, such as a stolen disk or a leaked backup.
What it does not protect against: anyone or anything that has the key. If your application decrypts data to use it, a compromised application or an over-privileged user can usually read it too.
Encryption at rest and in transit is a baseline. It is necessary, but rarely sufficient on its own.
Tokenisation
Tokenisation replaces a sensitive value with a token that has no meaning on its own. The real value is stored in a separate, tightly controlled vault. Systems that hold only tokens never see real data.
What it protects against: breaches of the many systems that store or pass along personal data. If your CRM, analytics warehouse or logs only hold tokens, a breach of those systems exposes tokens, not people’s details.
Format-preserving tokens look like the original: a tokenised mobile number still has ten digits, and a tokenised PAN still has the PAN format. Existing databases, validations and integrations keep working without changes.
The trade-off: the vault becomes critical. It must be highly available, and every request to turn a token back into a real value should be controlled and recorded.
Masking
Masking hides part of a value, for example showing a card number as XXXX-XXXX-XXXX-4821.
- Display masking hides data on screen while storing the full value underneath. It reduces casual exposure, but does not protect the stored data.
- Static masking permanently replaces real values with realistic fakes. It is useful for test and development copies, where real data should never be in the first place.
Hashing
Hashing turns a value into a fixed-length fingerprint. The same input always gives the same output, which makes hashing useful for matching records without storing the original.
A caution: values with limited possibilities, such as phone numbers or identity numbers, can often be recovered from a plain hash by trying every combination. Use keyed hashing, and do not treat a hash of such a value as anonymous.
Choosing the right approach
Most organisations end up using several techniques together:
- Encrypt everything at rest and in transit as a baseline.
- Tokenise high-risk fields such as identity numbers, bank details and contact information in the systems that do not need real values.
- Mask on screen for people who need to see that a record exists but not its full contents.
- Use static masking for non-production copies, so real personal data never reaches test environments.
- Control and log every reveal. Whoever turns a token back into a value should have a reason, and that reason should be recorded.
A useful test
For any system, ask: “If this system were breached tomorrow, what real personal data would be exposed?” If the answer is “all of it”, that system is a candidate for tokenisation.
To find out which systems hold personal data in the first place, see how to find the personal data hiding across your systems.
Arbor Vault keeps personal data in one guarded place and gives your systems tokens instead.
Explore Arbor VaultQuestions people ask
Is tokenisation more secure than encryption?
Neither is better in every case. Encryption protects data wherever the ciphertext goes, but anyone with the key can read it. Tokenisation keeps real values out of most systems entirely, so a breach of those systems exposes only tokens.
Does masking protect stored data?
Display masking only changes what people see on screen. The full value is usually still stored underneath, so masking should sit on top of other protections, not replace them.
Does tokenised or encrypted data stop being personal data?
That depends on the law and on who can reverse the protection. Treat it as a legal question and ask your lawyer rather than assuming protected data falls outside the rules.