Data Masking
Data masking is the practice of replacing sensitive values, such as names, card numbers, or health identifiers, with realistic but fictitious or obscured substitutes so data can be used for testing, analytics, or support without exposing the originals.
What is data masking?
Masking comes in two forms: static masking rewrites a copy of the data permanently, while dynamic masking hides values at query time based on who is asking. Static masking suits test, staging and offshore development environments. Dynamic masking suits production systems where support agents should see only part of a record.
Common techniques include substitution with fake but valid values, shuffling values within a column, nulling, partial redaction such as showing only the last four digits, and tokenization. Good masking preserves format and referential integrity, so applications and joins keep working. A masked card number should still pass a Luhn check, and a masked email should still look like an email, or validation code will reject the test data.
How do you choose a data masking technique for each field?
Pick the technique per field, based on what the downstream user actually needs from it.
Email and customer IDs: deterministic substitution, where the same input always yields the same fake value, so joins across tables still match.
Payment card numbers: PCI DSS limits what may be displayed to, at most, the issuer prefix (BIN) and the last four digits; everything else must be masked.
Dates of birth: shift each person's dates by a consistent random offset to keep ages and intervals realistic.
Free-text notes: use named-entity recognition to redact names, phone numbers and addresses.
Account numbers needed later: tokenize, storing the mapping in a secured vault.
What does data masking look like in practice?
A typical project masks a production copy once per night and gives every non-production user only the masked version. Picture a 90-person health insurance broker that wants an external QA team testing against realistic data.
A scanner flags columns holding names, member IDs, diagnoses and bank details.
A nightly job copies production PostgreSQL to staging and applies static rules with the PostgreSQL Anonymizer extension.
Member IDs are masked deterministically, so claims still link to the right fake member.
In Snowflake, a dynamic masking policy lets support staff see only the last four digits of national ID numbers, while the fraud team sees full values.
The QA team gets realistic names, addresses and claim histories, and the broker's contracts no longer need to cover an outside vendor handling real member data. Before release, say the team samples 200 masked rows and tries to re-identify anyone using public data; any hit sends the rules back for revision.
What are the limits of data masking?
Masked data is not automatically anonymous data. Under GDPR Recital 26, pseudonymized data that could be re-linked to a person, with a key or with other information, is still personal data and still in scope.
Quasi-identifiers: ZIP code, birth date and gender together can single people out even after names are removed.
Broken joins: masking a key inconsistently across tables silently breaks reports.
Lost edge cases: tests may miss bugs that only real, messy values trigger; synthetic data can fill those gaps.
Forgotten copies: logs, backups and CSV exports often hold the unmasked originals.
How is data masking different from encryption and anonymization?
Encryption hides data until someone with the key reverses it, masking gives users a usable substitute, and anonymization removes any realistic path back to the person. Encryption protects stored and transmitted data but shows plaintext to authorized apps.
Masking is chosen when people need realistic data without the real values. Data anonymization goes further and, if done properly, takes data outside GDPR's scope.
Tools include Snowflake masking policies, BigQuery dynamic data masking, SQL Server Dynamic Data Masking, Oracle Data Masking and Subsetting, Delphix, Tonic.ai and the open-source PostgreSQL Anonymizer.
Static vs dynamic data masking
Static masking | Dynamic masking | |
|---|---|---|
When applied | Once, on a copy of the data | At query time, per user |
Original data | Replaced in the copy | Untouched in storage |
Typical use | Test, staging, outsourced development | Production support and analytics |
Example tools | Delphix, Tonic.ai, PostgreSQL Anonymizer | Snowflake policies, SQL Server DDM |
Main risk | Unmasked backups or exports | Users with broad roles see everything |
How does VIZIO AI work with sensitive data in analytics projects?
VIZIO AI's case studies do not describe a dedicated masking project; the closest overlap is building analytics on confidential client and financial records. For a Seattle-area family law firm with 15 attorneys, our DX Studio combined Lawmatics, Clio Manage and QuickBooks data in a centralized SQL warehouse and gave leadership Power BI dashboards built on firm-level metrics such as conversion rates, billable utilization and billed versus collected revenue.
The firm reduced manual reporting time by 65% and improved revenue tracking accuracy by 42%. Where to start: list every column that identifies a person, then decide which users need the real value, a partial value or none at all.