Join our Newsletter — 33% off our NHI Course
Home› Guides› Tokenisation for Beginners: Swapping Sensitive Values for Safe…
Guide Data Security

Tokenisation for Beginners: Swapping Sensitive Values for Safe Stand Ins

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 27 November 2026 9 min read
On this page

Tokenisation replaces a sensitive value, such as a card number, with a stand-in value called a token that is useless on its own, while data masking hides or disguises sensitive values so people can work with data without seeing the real thing.

Both sit under the wider topic of protecting data, alongside encryption. If you are new to that, start with Encryption for Beginners. This page explains, in plain English, how tokens and masking work, where each fits, and the mistakes beginners make.

By the end of this guide you will be able to:

  • Explain the difference between tokenisation and data masking.
  • Describe how a token vault swaps tokens back for real values, and why that vault matters.
  • Identify simple first steps to reduce where sensitive data is stored.

Key takeaways

  • A token is a safe stand-in. Systems pass the token around instead of the real value, so fewer systems hold the sensitive data.
  • The vault is the crown jewel. Whatever can swap tokens back for real values needs the strongest protection and the tightest access.
  • Masking is about what people see. It hides all or part of a value, either in a permanent copy (static) or on the fly when data is shown (dynamic).
  • Neither removes the need for other controls. Tokenisation can shrink the systems in scope for rules such as PCI DSS, and masking reduces accidental exposure, but access control, logging and encryption still matter.

What it is, in plain English

Tokenisation swaps a sensitive value for a substitute. The PCI Security Standards Council, which sets the rules for card payments, defines it as a process in which the primary account number (PAN, the long card number) is replaced with a surrogate value called a token.[1] The UK Information Commissioner's Office (ICO) explains that because a randomly generated token has no mathematical link to the original value, knowing the token does not let someone work out the original.[2]

Data masking hides sensitive values from people who do not need to see them. Static data masking makes a permanently disguised copy, for example a test database with fake names. Dynamic data masking leaves the stored data unchanged and hides values only in what is shown to the user, such as showing a phone number as xxxx.[3]

Think of a cloakroom. You hand over your coat and get a numbered ticket. The ticket is useless to a thief who picks it up off the floor somewhere else, and only the cloakroom can swap it back for the coat. Tokenisation works the same way, with the token vault as the cloakroom. Where the analogy breaks down: a cloakroom ticket can be used by anyone holding it, while a well-designed token system also checks who is asking before it swaps a token back.

This matters because every system that holds real card numbers or personal data is a target and has to be protected to a high standard. Swapping in tokens or masked values means fewer systems and fewer people handle the real data.

How it works, step by step

  1. Capture. A sensitive value arrives, for example a customer types a card number into a payment page.
  2. Tokenise. The tokenisation service stores the real value in a protected token vault and creates a token. The PCI SSC describes the vault as the central repository for card numbers and their tokens.[1]
  3. Use the token. Order systems, customer service tools and reports store and pass around the token instead of the card number.
  4. Detokenise only when needed. When a system genuinely needs the real value, for example to send a refund to the card network, it asks the vault to swap the token back. This reverse step is called detokenisation.[1]
  5. Mask what people see. Staff screens and copies used for testing show masked values, for example only the last four digits, so people can do their jobs without seeing the full value.
  6. Control and log. Access to detokenise or unmask is limited to named systems and roles, and every use is recorded.

The table shows where each technique fits.

TechniqueWhat happens to the dataCan the real value come back?Typical use
TokenisationReal value stored in a vault; a token is used elsewhereYes, through the vault, for approved systemsCard numbers, account numbers, national ID numbers in business systems
Static data maskingA permanently disguised copy is madeNo, not from the masked copyTest, training and analytics copies
Dynamic data maskingStored data unchanged; values hidden when shownYes, for users allowed to unmaskStaff screens and reports in live systems
EncryptionValue scrambled with a keyYes, with the keyData stored on disks and sent over networks

Payment networks use a related idea. EMVCo, the body behind chip card standards, describes payment tokenisation as replacing the card number with a unique alternative value, the EMV Payment Token, which is restricted to a specific merchant, device or payment scenario so that a stolen token has little value elsewhere.[4] That is the technology behind paying with a phone wallet. See the Network Tokenisation for Payments Guide for more.

A worked example

Northgate Cycles is a fictional bike shop with a website and two branches. Its old system saved full card numbers in the order database, which the whole team, the accountant and a developer's test copy could all read.

Ellie, the shop manager, works with their developer on three changes. Card numbers now go to their payment provider's tokenisation service at checkout, and the order database stores only the token and the last four digits. Staff screens show "card ending 4421" instead of the full number. The developer's test database is rebuilt as a static masked copy with made-up names and addresses.

When a customer asks for a refund, staff click "refund" and the payment provider uses the token to send money back to the right card. Nobody in the shop sees the card number. Ellie still checks with their payment provider and acquiring bank which parts of the business remain in scope for PCI DSS, because the systems that can swap tokens back stay in scope and the shop's own checkout page still matters.[1]

Common mistakes

MistakeWhat to do instead
Assuming tokenisation means compliance is finished.The PCI SSC states that tokenisation does not remove the need to maintain and validate PCI DSS compliance, and that the tokenisation system, including detokenisation and card storage, is in scope.[1] Confirm scope with your assessor or acquirer.
Letting too many systems detokenise.Keep the list of systems and roles that can swap tokens back short, review it, and log every request.
Treating dynamic masking as a strong security barrier.Microsoft notes that dynamic data masking is not a complete security measure: users who can run their own queries may be able to infer masked values. Use it with least-privilege permissions, auditing and encryption.[3]
Copying live data into test systems.Use a static masked copy or synthetic data for testing and training.
Thinking tokenised personal data is no longer personal data.The ICO explains that pseudonymised data, which includes tokenised data, stays personal data for anyone who holds the extra information needed to link it back to a person.[2]

Key terms

Tokenisation
Replacing a sensitive value with a non-sensitive substitute that still lets systems do their work, without revealing the original data.
Token vault
A tightly controlled store that holds the real values and the tokens that stand in for them, with strict access controls and audit logging.
Data masking
Hiding or disguising sensitive values so people or systems can work with the information without seeing the original content.
Static data masking
Permanently transforming sensitive data into a masked copy before it is used elsewhere, such as for testing or analytics.
Dynamic data masking
Hiding sensitive values in query results at the moment they are shown, without changing the stored data.
Pseudonymisation
Replacing direct identifiers with a coded reference so records can still be linked, while the key to re-identify people is kept separately and protected.
PCI DSS
The Payment Card Industry Data Security Standard, a security baseline for organisations that store, process or transmit payment card data.

First steps

Three things you can do this week:

  1. Find the sensitive values. List where card numbers, bank details and national ID numbers are stored, including spreadsheets, exports and test copies.
  2. Ask your payment provider about tokens. Many providers offer tokenisation so you never need to store full card numbers yourself.
  3. Replace live data in test systems. Swap any copy of real customer data in test or training systems for a masked or synthetic copy.

Checklist

Checklist:

  • We know every place full card numbers or other high-risk values are stored.
  • Business systems store tokens or masked values, not the real values, wherever possible.
  • Only a short, named list of systems and roles can detokenise or unmask.
  • Every detokenise or unmask request is logged and the logs are reviewed.
  • Test and training systems use masked or synthetic data.
  • Staff screens show only what each role needs, such as the last four digits.
  • We have confirmed our PCI DSS scope with our acquirer or assessor after introducing tokens.

Suggested learning pathway

Standards and references

  1. Information Supplement: PCI DSS Tokenization Guidelines, Version 2.0. PCI Security Standards Council, August 2011. https://listings.pcisecuritystandards.org/documents/Tokenization_Guidelines_Info_Supplement.pdf, accessed 27 Nov 2026.
  2. Pseudonymisation. Information Commissioner's Office (ICO), last updated 10 Oct 2025 (under review following the Data (Use and Access) Act). https://ico.org.uk/for-organisations/uk-gdpr-guidance-and-resources/data-sharing/anonymisation/pseudonymisation/, accessed 27 Nov 2026.
  3. Dynamic data masking. Microsoft Learn (SQL Server), Microsoft, last updated 25 Nov 2026. https://learn.microsoft.com/en-us/sql/relational-databases/security/dynamic-data-masking, accessed 27 Nov 2026.
  4. EMV Payment Tokenisation. EMVCo. https://www.emvco.com/emv-technologies/payment-tokenisation/, accessed 27 Nov 2026.

Related NHI Mgmt Group resources: Encryption vs Hashing vs Masking · Database Firewall and Dynamic Data Masking Guide · Data Masking and Tokenisation Buyer's Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.