Pcornel
Browse topics
Options
Recent
Favorites
Security · Technical reference

Masking

Direct answer

Data masking hides sensitive values by replacing parts of them, such as showing ****1234 for a card number, or using realistic fake values in test databases, so data stays usable without exposing originals.

When to use this

Use this when sensitive values must be hidden but data stays usable.

First 30 seconds

1. Masking hides parts of data (e.g. ****1234).

2. Static masking for test data; dynamic for display.

3. Not reversible (unlike encryption/tokenisation).

4. Use for non-production.

5. Verify masks are applied.

Operational verification

real data → masking → masked output

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common mistakes
  • Dynamic masking treated as access control — users can often infer values through queries (WHERE Email LIKE 'a%').
  • Masked test data that can be linked back to people with other columns.
  • Admins with UNMASK rights by default.
  • Masking only in the UI while APIs return full data.
Platform / version applicability
Data protection and recovery security
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformData protection and recovery security
Scope / prerequisiteUse this when sensitive values must be hidden but data stays usable.
What next?2 suggested next steps
Evidence1
On this pageJump to a specific section
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Static masking for test copies, dynamic for display.
  • Masked data should not be reversible.
  • Keep format where needed.
Key checks
  • Masking rules (display, test data) — applied
  • Test/dev environments use masked data — no production PII
  • Dynamic data masking settings in DB — queries
ReferenceWhy it matters1 section · depth on demand

Static vs dynamic masking

  • Static masking creates a masked copy (test and development data), irreversibly.
  • Dynamic masking hides values at query time based on the user's role; the stored data is unchanged.

Masked test data must not allow re-identification by combining fields (name + birth date + postcode).

ReferenceImportant terms & boundaries2 sections · depth on demand

In depth

Data masking hides sensitive values while keeping data usable — for example showing only the last four digits of an account number, or replacing real customer names with realistic fake ones in test environments.

TypeUse
Static maskingCopy production data to test with values permanently replaced
Dynamic maskingMask at query time based on user role
TokenisationReplace with a token; real value retrievable only from a secure vault
RedactionRemove values entirely (logs, documents)
PseudonymisationReplace identifiers; re-identification possible with separate key

Using real production data in development and test environments is a common source of breaches; masked or synthetic data removes that risk. Note that pseudonymised data is still personal data under GDPR.

Examples

DataMasked
Card number** ** 1234
Emailp****@example.com
CPR number010190-****
Phone+45 12 34

SQL Server dynamic data masking: ALTER TABLE Customers ALTER COLUMN Email ADD MASKED WITH (FUNCTION = 'email()'). Users with UNMASK permission see real values.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docData protection and recovery security current

Authoritative/upstream documentation reviewed for bounded claims in Data Security → Masking. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://csrc.nist.gov/pubs/sp/800/209/final · confidence 94%
Confirmation

Confirm action

Continue?