Data masking and anonymization are two distinct methods for reducing or completely severing the link between personal data and an individual. A KVKK-compliant process follows six steps: identifying the data, choosing the method, selecting the technique, applying it on a copy, testing for re-identification, and documenting. Masking is often reversible, while anonymization must be irreversible.
What is the difference between data masking and anonymization?
Masking hides specific fields of personal data, while anonymization makes data impossible to trace back to a person, even when combined with other data. The difference lies not in how much is hidden, but in reversibility and linkability to an individual.
The KVKK Guide defines masking as deleting, striking through, painting over or starring out certain fields of personal data. The definition of anonymization comes from the Regulation on the Deletion, Destruction or Anonymization of Personal Data: the data must not be relatable to an identified or identifiable person, even when matched with other data. Masking is an operation, whereas anonymity is the outcome you must achieve.
Starring out the name and national ID number in a customer table is masking. If birth year, district and occupation remain together in the same table, that combination may point to a single person. The Guide calls these fields indirect identifiers. For this reason, a masked dataset is often not considered anonymous and continues to be protected as personal data.
| Criterion | Data masking | Data anonymization |
|---|---|---|
| Purpose | Make sensitive fields invisible while preserving data structure | Sever the link between data and the person |
| Reversibility | May be possible if a key or source data exists | Must not be possible |
| Personal data status | Remains personal data if a person can be reached when matched with other data | Falls outside the definition of personal data if no person can be reached |
| Typical use | Testing, development, role-based viewing | Analytics, sharing, retaining data whose purpose has ended |
| Example techniques | Starring out, consistent fake values, format-preserving encryption | Generalization, k-anonymity, noise addition, variable removal |
When does KVKK require anonymization and when masking?
When the reason for processing data ends, KVKK requires one of three actions: deletion, destruction or anonymization. Masking is not one of these three routes. It can, however, be a technique used within anonymization, and it is also applied as a security measure.
Article 7 of Law No. 6698 sets this rule. The Regulation states that once all conditions for processing cease, disposal must take place either ex officio or at the data subject’s request. The data controller must also describe the methods it uses in its policies and procedures.
A practical decision rule: if the purpose of the data has ended but it will be kept for statistics, modeling or sharing, anonymization is needed. If the data is still useful in a live system but test teams or staff with limited authority should not see every field, masking is sufficient. In the second case the data is still personal data, and KVKK’s other obligations continue to apply. For an assessment specific to your organization, it is wise to work with your KVKK counsel.
What should be in place before you start masking and anonymization?
Before you start, you should have a personal data inventory, a retention and disposal policy, an access authorization matrix and a clear division of responsibilities. The Guide requires anonymization to follow the principles in the retention and disposal policy, so without that policy the process has no foundation.
- Inventory: which personal data is held in which system (database, file server, backup, cloud)
- Access authorization matrix: which role sees which field
- Division of responsibilities: who approves the rules, who applies them, who verifies them
- Test copy: a separate, protected environment where production data can be processed
Building the inventory is usually part of data quality and governance work. A data catalog solution speeds this up by making fields that carry personal data visible in one place across systems.
How do you perform data masking and anonymization step by step?
The process has six steps, and the output of each step is the input of the next.
Step 1: Identify and classify personal data in your inventory
The first step is to classify each field as a direct or indirect identifier. Direct identifiers point to a person on their own: full name, national ID number, phone number, email. Indirect identifiers look harmless alone but single out a person when combined: birth year, postal code, occupation, district. Special categories of data such as health, biometric and genetic data take priority on the list. Unstructured sources such as PDF contracts, support notes and email attachments must also enter the inventory, because free text is often overlooked.
Step 2: Choose masking or anonymization based on the purpose of use
The method is determined by whether the data needs to be traceable back to an identity. If an authorized support agent will verify a customer, masking is appropriate. For work that does not need identity, such as sales analysis or model training, anonymization is chosen. The Guide recommends considering criteria such as the nature and size of the data, the purpose of processing, the reliability of the recipient and the scale of harm if anonymity is broken.
Step 3: Select the technique that fits the data type
The technique is selected according to data type and the benefit you expect from the data. In masking, static masking permanently changes values in a copy, while dynamic masking hides them at query time according to the user’s authorization. Consistent masking converts the same input to the same output every time, preserving relationships between tables. Format-preserving encryption (FPE) produces output in the same format as the input.
For anonymization, the Guide lists three groups. Methods that do not introduce value irregularity are variable or record removal, local suppression, generalization, top and bottom coding, global coding and sampling. Methods that do introduce it are micro-aggregation, data swapping and noise addition. The statistical methods that strengthen anonymity are k-anonymity, l-diversity and t-closeness. If numerical analysis is planned, methods such as micro-aggregation, which preserve averages, retain the data’s usefulness.
Step 4: Apply the process on a copy of the production data
Each operation should run on a separate copy of the production data, not on the live database. That way, a run with a faulty rule does not corrupt the original, and the result can be compared with the source. Consistent masking is critical here: if a customer number does not turn into the same masked value across the orders, invoices and support tables, tests cannot find the relationships. Also restrict access to the raw copy during the period between creating it and producing the masked output.
Step 5: Test the risk of re-identification
You verify anonymity by trying to trace the output back to a person by combining it with other data. The Guide looks for three conditions: the output must not be breakable by merging with another dataset, no combination of values may make a record unique, and values must not combine to produce a firm inference.
In practice, check by counting that every combination of indirect identifiers retains at least k records and that sensitive values in each group include more than one variety. The Guide also requires the risk of matching against information held by recipient organizations or publicly available data to be controlled through contracts and risk analysis.
Step 6: Document the process and monitor it regularly
The methods you use must be written clearly in your retention and disposal policy and related procedures; the Regulation lists this as a data controller obligation. Record the rule set, run date, verification result and responsible person. The Guide requires controls to be renewed as the dataset’s characteristics change. So repeat the test whenever a new column is added or the data is merged with another dataset.
Which technique should be chosen for which data type?
Masking or field removal suits direct identifiers, while generalization and grouping suit indirect identifiers. The table below is a starting point for common data types.
| Data type | For testing and operations (masking) | For analytics and sharing (anonymization) |
|---|---|---|
| National ID number | Consistent fake value of the same length, or format-preserving encryption | Remove the field entirely |
| Phone | Consistent fake number, or starring out all but the last digit | Remove the field entirely |
| Consistent fake email address | Remove the field entirely | |
| IBAN and card number | Format-preserving encryption or partial starring | Remove the field entirely |
| Date of birth | Consistent shifting or noise addition | Age range (top and bottom coding) |
| Address | Hide street and door number | Generalize to district or province level |
| Free text, PDF | Automated detection and redaction, then human review | Manual review for full anonymization |
The table is a starting point. The final choice should be made using the criteria listed in the Guide, together with data sensitivity and the harm that would follow if anonymity were broken.
How can you automate a data masking pipeline with Talend?
In Talend, masking can be automated with the tDataMasking component as an intermediate step in a data integration job. According to Qlik’s documentation, this component belongs to the Data Quality family and is available in several Talend platform packages, including Talend Data Fabric. Data read from the source system passes through the component and is written to the target test database, so the same rules run on every refresh.
The component offers ready-made masking functions for types such as bank account, address, email, credit card and phone. Functions operate in random, consistent, bijective and repeatable groups. A consistent function converts the same value to the same masked value within a run. For format-preserving encryption, FF1 methods based on a NIST standard are available. We recommend testing, before going to production, that the ready-made functions give the output you expect for local formats such as Turkish national ID numbers and IBANs.
BiTechnology provides licensing, project implementation, support and consulting services for Qlik and Talend solutions. When a masked or anonymized dataset is fed into an analytics platform, dashboards can be shared without carrying personal data.
What are the most common mistakes in data masking and anonymization?
The most common mistake is treating starring out as anonymization. In the Guide’s k-anonymity example, name and postal code are masked, yet a person can still be found if only one record has the same values. That is why masking alone is not enough and records must also be grouped.
The second mistake is overlooking indirect identifiers. If age, district and occupation together leave a single record, identity is exposed. When groups are small, apply generalization or record removal.
The third mistake is leaving the sensitive value in a group uniform. In the Guide’s example, every record in a group of four reads “cancer”, so anyone known to belong to that group can have their illness learned. L-diversity prevents exactly this.
The fourth mistake is keeping the mapping table or encryption key in the same environment as the masked data. The Guide counts the decoding of codes or pseudonyms substituted for direct identifiers as one of the ways anonymity is broken. Store the key in a separate place with restricted access. If you are producing anonymous output, destroy the mapping entirely.
Example scenario: How do you protect test data and analytics data at the same time?
Producing two separate outputs from the same source table is the cleanest way to give each team only the data it needs. The example below is hypothetical.
Suppose a retailer’s customer table contains full name, national ID number, phone, email, address, date of birth and order amount. The software team wants to test the application with realistic data, while the analytics team wants to see sales trends by region. For testing, the table is copied, identity fields are masked consistently, and order relationships are preserved.
In the analytics output, identity fields are removed entirely, date of birth is converted to an age range and the address to a district. Customers who remain as a single record in a district and age-range combination are removed or grouped. The two outputs are stored with different permissions, and the analytics output can become a dashboard in a platform such as Qlik.
In short: data masking and anonymization
- Data masking and anonymization are not the same thing: masking hides fields, while anonymization severs the link between data and person.
- The KVKK Regulation defines anonymous data as data that cannot be related to a person even when matched with other data, so simple starring is often not enough.
- The process has six steps: classification, method selection, technique selection, applying on a copy, re-identification testing and documentation.
- Consistent masking is preferred for test environments, and anonymization supported by methods such as k-anonymity for analytics and sharing.
- Talend’s tDataMasking component runs masking rules automatically within the data integration pipeline.
Frequently asked questions about data masking and anonymization
Is masked data considered personal data under KVKK?
Masked data remains personal data if a person can be reached when it is matched with other data or reversed. The KVKK Regulation and Guide tie anonymity to this test: the data must not be relatable to an identified or identifiable person even when matched with other data. Simple starring often fails to meet this threshold.
Does pseudonymization replace anonymization?
No. In pseudonymization, identifying information is replaced with a code or label and the mapping is kept, so tracing back to the person remains possible. The KVKK Guide counts the decoding of code or pseudonym mappings as one of the ways anonymity is broken. Treat pseudonymized data as personal data that needs protection, not as anonymous data.
Can real customer data be used in a test environment?
If a test environment is not protected as strictly as production, it should not hold real customer data. KVKK’s data security obligation applies to all environments, including test. Converting a copy of production data with static masking reduces both the compliance burden and the risk of leaks. Because the format is preserved, tests keep working.
What is the difference between static and dynamic data masking?
Static data masking permanently changes sensitive values in a copy of the source data and is typically used for test and development environments. Dynamic data masking leaves the data unchanged and shows it masked at query time, according to the user’s authorization. In short, the static method transforms the data, while the dynamic method changes only the view.
Can anonymized data be re-identified?
Yes, if anonymization is inadequate. The KVKK Guide notes that anonymized data can have its anonymity broken by merging with another dataset, and that the data controller must control this risk. That is why methods such as k-anonymity and l-diversity are used to reduce unique records, and checks are repeated whenever the data changes.
How is masking done in documents such as PDFs and contracts?
In unstructured data such as documents and PDFs, personal data is first located with automated detection tools and then redacted. Because automated detection can miss free text such as names and addresses, a person should review the output. It also matters that redaction cannot be undone: a file that is struck through but still has readable text underneath is not considered masked.
Which dataset should you start with?
The copy of the production database taken into the test environment is often the dataset the most people have access to, so it makes sense to start there. First run consistent masking on that copy, then produce a separate anonymous output for analytics. KVKK-compliant data masking and anonymization is not a one-off project; it is a process that must be re-verified as the data changes.
If you want to mask personal data with Talend in your test environments or analytics platform and use it safely on the Qlik side, you can request a demo from BiTechnology and evaluate the right setup for your existing data flows together.
References
- Regulation on the Deletion, Destruction or Anonymization of Personal Data
- Qlik Help, Talend tDataMasking documentation: component properties and data masking capabilities
Last updated: October 2026