Data without names: pseudonymisation or anonymisation?
Anyone who wants to analyse customer data with AI or hand it to an external team often removes the names first. Whether that protects the customers is a different question. The article explains the difference between pseudonymisation and anonymisation. An invented patient from the village of Maschwanden and figures from the Federal Statistical Office show how easily people can be found again without their names. A calculator shows this for all 2,115 Swiss municipalities.
Analysis · Published 11 Nov 2026 · Updated 12 Nov 2026 · Joel Barmettler
Why companies anonymise data before using AI, and where it fails
A company cannot simply hand customer data to a cloud model, an external development team or an AI agent. If the data contain information about people, data protection law applies. Data fall outside data protection law only once nobody can be identified with reasonable effort. Deleting the names is often not enough for that: 72 per cent of Switzerland’s residents can already be identified uniquely by date of birth, sex and municipality of residence, as a Souverana calculation shows.
Three uses of AI on customer data are common:
- A language model such as ChatGPT or Claude analyses an export of the customer database in minutes.
- An external development team tests with a copy of the real data and finds bugs that often do not occur with invented data.
- An AI agent with access to the database answers questions for which someone would otherwise have to write a report.
In all three cases the data reach a third party, such as the operator of the model. If the data passed on contain information about customers, patients or employees, that information is personal data. Personal data are all information relating to an identified or identifiable person. That covers far more than the name. Personal data are governed by the Swiss data protection act, the revFADP. If a company has personal data processed by a service provider, the law usually requires a contract. If the servers are abroad and the country does not offer adequate data protection, contractual safeguards are needed. What a cloud provider may do with the data is set out in its contract. With Claude from Anthropic, for example, this depends on the plan chosen.
For law firms and medical practices, professional secrecy comes on top. This duty of confidentiality restricts whom they may share their clients’ data with at all.
The usual way out: the data are changed beforehand so that they can no longer be linked to any person. There are two methods for this, and they are easily confused.
Anonymising means changing the data so that they cannot be linked to any person, not even indirectly. The data are then no longer personal data, and the revFADP does not apply to them. Whether data are anonymous in this sense also depends on the recipient: on which other data the recipient already holds.
Pseudonymising means replacing names and numbers with codes, such as “Customer 4711” instead of “Peter Keller”. The mapping sits in a separate table. In day-to-day work the separate table keeps curious eyes away. Legally, the data usually remain personal data.
Datasets that are treated as anonymous in day-to-day operations are often only pseudonymised. The reason is the information that remains after the names are replaced: date of birth, sex, place of residence. We calculated for Switzerland how much these three attributes give away.
This article opens our three-part series on anonymising data. The second part covers the legal position in Switzerland. The third part compares where in the architecture data can be anonymised. In that part we also measure how reliably tools find names and numbers in texts.
What date of birth, sex and municipality give away in Switzerland
An invented example shows the problem. A family practice in the Knonaueramt plans to analyse its patient data with AI. Beforehand, the practice deletes the names. Each row of the patient list still holds sex, date of birth, municipality of residence and diagnosis. One of the rows belongs to Hildegard Kaufmann, 87, from Maschwanden: a woman, born on 14 March 1939, heart failure. The practice and the patient are invented; the population figures for Maschwanden are real.
Maschwanden lies about 20 kilometres from Zurich and had exactly 669 residents at the end of 2025. According to the Federal Statistical Office, exactly one woman born in 1939 lived in the village. In our example, that woman is Hildegard. The municipal newsletter congratulated her on her 87th birthday in March. Hildegard’s name is missing from the patient list. Anyone who lives in the village or has a list of residents still knows whose row it is. Hildegard’s diagnosis is then known as well. To match a row without a name to a person, a source with names and dates of birth is enough, such as a club directory, a social media profile or the birthday congratulations in the municipal newsletter.
The graphic shows an extract of the invented patient list without names. You know what a neighbour knows from the municipal newsletter: a woman, born on 14 March 1939, living in Maschwanden. Look for Hildegard’s row, then coarsen the information step by step.
By our calculation, around 99 per cent of Maschwanden’s residents are unique by date of birth and sex. Hildegard is therefore not a special case.
We ran this calculation for all 2,115 municipalities in Switzerland. It is based on the population figures of the Federal Statistical Office (FSO) as of 31 December 2025, broken down by municipality, sex and single year of age.[1] Anyone who is forty at the end of 2025 was born in 1985, so age gives away the year of birth. How birthdays are spread within a year of birth is not in the table. We assume that birthdays fall evenly across the year. A person counts as unique if they are the only one in their municipality with that sex and that date of birth.
Key figure
72 %Source: Own calculation with FSO STATPOP, permanent resident population on 31.12.2025, 2,115 municipalities
The result depends above all on the size of the municipality. More than half of all Swiss municipalities have fewer than 2,000 residents. There, over 97 per cent of people are unique. In the city of Zurich, with 441,000 residents, most people share their sex and date of birth with several others. Only just over 1 per cent can be identified uniquely there.
In the USA, the computer scientist Latanya Sweeney arrived at 53 per cent in 2000 for the same combination of date of birth, sex and place of residence, using data from the 1990 census.[2] Her second figure is cited more often: 87 per cent with the five-digit ZIP code. The researcher Philippe Golle re-examined that figure in 2006 and arrived at 63 per cent.[3] At 72 per cent, Switzerland lies above the American figure of 53 per cent for place of residence. The two figures come from different years and from places of residence drawn with different boundaries. One reason for the difference is likely the many small Swiss municipalities.
The calculator shows the figures for all 2,115 municipalities, starting with Maschwanden. The vertical line in each bar marks the Swiss average.
How “unique” becomes a name: three well-known cases
A unique row is complete except for the name. A second source that contains the same attributes together with names supplies it. The best-known examples come from the USA.
The governor’s hospital data, 1997. The insurance fund for Massachusetts state employees passed data on hospital stays of around 135,000 employees and family members to researchers, without names but with date of birth, sex and ZIP code. Latanya Sweeney bought the voter roll of the city of Cambridge for 20 dollars. In it, six people had the same date of birth as Governor William Weld. Three of them were men, and only one lived in the governor’s ZIP code.[4] That is how Sweeney found the governor’s medical record.
AOL’s search queries, 2006. AOL published around 20 million search queries from about 650,000 users for research and replaced the users’ names with numbers. Reporters at the New York Times found user 4417749 within days: Thelma Arnold, a 62-year-old widow from Lilburn in the US state of Georgia.[5] Her searches for places nearby and for people with her surname were enough.
Netflix’s film ratings, 2008. For a competition, Netflix released 100 million ratings from 480,000 subscribers, again without names. The researchers Arvind Narayanan and Vitaly Shmatikov matched the Netflix ratings against public ratings on the film platform IMDb. Eight ratings with approximate dates were enough to identify 99 per cent of the subscribers in the dataset uniquely, even when two of the eight were wrong.[6] Netflix cancelled the planned second competition in 2010 after a lawsuit.[7]
None of the three datasets contained names. In 2019 a research team led by Luc Rocher generalised the question with a statistical model. The study appeared in Nature Communications. With 15 demographic attributes, 99.98 per cent of Americans could be correctly re-identified in any dataset.[8]
Four terms and four kinds of columns
Besides anonymisation and pseudonymisation, two further terms come up in projects. The table sets all four side by side:
| Term | What happens to the data | What applies afterwards |
|---|---|---|
| Anonymisation | Data are changed so that no person can be identified with reasonable effort | No longer personal data; the revFADP does not apply |
| Pseudonymisation | Names and numbers are replaced; the mapping is kept separately | Usually still personal data |
| Masking | Individual values are hidden or falsified | A technique: anonymous or pseudonymous depending on the remaining information |
| Synthetic data | A generator creates new records modelled on the real ones | No real people, as long as the generator does not reproduce real records |
The revFADP does not use the word pseudonymisation. All that counts under the revFADP is whether information relates to an “identified or identifiable natural person”.[9] Whoever holds the key to the pseudonyms can identify the person. For the key holder, the data remain personal data. Whether the data are also personal data for a recipient without the key is covered in the second part of this series.
A look at the individual pieces of information shows which method is sufficient. In a database, each kind of information sits in its own column, such as date of birth or diagnosis. The columns fall into four groups:
- Direct identifiers identify a person on their own: name, AHV number (the Swiss social security number), email address, phone number, IBAN.
- Quasi-identifiers identify a person only in combination: date of birth, sex, postcode or municipality, occupation, nationality, date of joining.
- Sensitive attributes are what third parties should not learn: diagnosis, salary, tax amount, credit limit. Sensitive attributes are usually the reason for analysing the data in the first place.
- Free text can contain information from all three groups, in any form. A note such as “Mr Keller, the new municipal clerk, is calling about the mortgage” contains a name, an occupation tied to a place and a financial matter.
Pseudonymisation mainly replaces the first group. The quasi-identifiers stay in the dataset unchanged. Re-identification succeeds through exactly these attributes. Free text is the hardest group, because it has to be read row by row, by hand or with a model. In the third part we measure how well tools find names, AHV numbers and addresses in Swiss texts.
Protection costs depth of analysis
The obvious measure is to coarsen attributes. The calculator shows how much that achieves. If only month and year of birth are kept, 12 per cent of residents across Switzerland are still unique. If only the year of birth is kept, the figure is 0.4 per cent.
That does not hold everywhere, however. In municipalities with fewer than 500 residents, 17 per cent are still unique even with year of birth, sex and municipality. There, the municipality has to be coarsened as well, for example to the district.
Coarser data allow less precise analysis. A pension fund calculating when pensions start needs the exact date of birth. An analysis of the age structure per canton works with the year of birth. A development team testing a deadline calculation works with invented, valid data. How coarse the data may be is therefore decided separately for each recipient and each purpose.
Hildegard’s village shows the price. At the level with age group and district, Hildegard’s row fits nine patients of the practice and 526 women in the Bezirk Affoltern. The question of how many patients aged 85 and over from Maschwanden have heart failure can then no longer be answered. The list only yields a figure for the whole district: three. Analyses of small groups therefore almost inevitably conflict with anonymisation. For nobody to find Hildegard, Hildegard has to disappear into a larger group. The same applies to every other outlier in the dataset. With the outliers, the differences between small groups also disappear from the analysis.
How to measure whether it is enough
Whether a dataset is anonymous enough can be checked with three metrics. These metrics come from research published from 2002 onwards and are built into freely available tools today.
k-anonymity requires every combination of the quasi-identifiers to occur at least k times.[4] With k equal to 5, every person is hidden in a group of at least five. For year of birth, sex and municipality, around 254,000 residents of Switzerland break this rule, just under 3 per cent. Of these residents, 89 per cent live in municipalities with fewer than 2,000 residents. To reach k equal to 5, the attributes of these 254,000 people would have to be coarsened or the rows concerned deleted. In the patient list from the graphic, Hildegard’s group only exceeds five rows at the fourth level. The two men and the 90-year-old patient in the list still form smaller groups even there.
l-diversity closes a gap in k-anonymity. If all five people in a group have the same diagnosis, the diagnosis is revealed, even if nobody knows which of the five rows belongs to the person being sought. l-diversity requires at least l different values of the sensitive attribute in every group.
Differential privacy works on the analyses.[11] Every result receives precisely calibrated noise. Whether a particular person is in the data then barely changes the result. The US Census Bureau protected the 2020 census this way. Before that, in its own test, the Census Bureau had reconstructed the records of 97 million people from the published 2010 tables.[12] The noise costs accuracy, especially in small areas.
In the graphic you can check the three metrics on the patient list from Maschwanden: how large the groups are, whether a group gives away its diagnosis and how much the noise changes a small and a large count.
As a rough guide: k-anonymity and l-diversity fit when whole rows are passed on, for example as test data or an export. Differential privacy fits key figures and dashboards. For free text, the three metrics are of little use. There, names, numbers and addresses have to be found and replaced in the text itself.
Three routes to using AI on personal data anyway
AI on customer data remains possible, by three routes.
Anonymise as far as the purpose allows. The data are coarsened until the metrics from the previous section show that the protection is sufficient. This route suits test data and analyses that do not need individuals. If the data are anonymous for the recipient, the requirements of the revFADP no longer apply, including for cloud models and recipients abroad.
Keep the data in-house. A model in your own operation processes the real values without the values leaving the company. Open models such as the Swiss Apertus can be run on your own hardware or with a Swiss hosting provider.
Engage a provider. A cloud provider or an external team processes the personal data on your behalf, under contract and with the necessary safeguards. For data under professional or official secrecy, this route is particularly demanding.
The second part of this series clarifies which route is permitted when. The third shows where in the architecture to start.
How to get started
A list of the information that is to be passed on is enough for the first step. In a database, that information is the columns of the tables concerned.
- 01
Classify the columns
Assign every column of the database to one of the four groups: direct identifiers, quasi-identifiers, sensitive attributes, free text. Mark free-text fields separately.
- 02
Set the purpose per recipient
For each recipient (development team, AI agent, analysis), note which columns the recipient really needs and at what precision. Everything else is dropped or coarsened.
- 03
Measure
For the remaining quasi-identifiers, count how many combinations occur fewer than five times. A simple grouping query or a free tool such as ARX is enough for this.
- 04
Decide and record
Record the protection level, the measured value and the approval in writing. The second part of this series shows what belongs in such an anonymisation concept.
Sources
Frequently asked questions
- What is the difference between anonymisation and pseudonymisation?
- Pseudonymisation replaces names and numbers with codes. The data can still be linked to people, through a key or through attributes such as date of birth and place of residence. Pseudonymised data therefore usually remain personal data. Data are anonymous only once no person can be identified with reasonable effort. At that point the revFADP no longer applies.
- Are data without names anonymous?
- Usually not. Date of birth, sex and municipality of residence alone are enough to identify many people uniquely. Souverana checked this with population data from the Federal Statistical Office as of the end of 2025: in Switzerland, these three attributes identify 72 per cent of residents uniquely. If a second source with names and the same attributes is added, the rows can be matched to individual people.
- Are pseudonymised data personal data under the revFADP?
- The revFADP does not use the term pseudonymisation. It asks whether data relate to an identified or identifiable person (Art. 5 let. a). For the controller who holds the key, pseudonymised data are personal data. For a recipient without the key, they are personal data if that recipient can identify the people with reasonable effort. This classification does not replace legal advice.
- What is k-anonymity?
- k-anonymity is a measure of how well people are hidden in a dataset. A dataset is k-anonymous when every combination of attributes such as year of birth, sex and place of residence occurs at least k times. With k equal to 5, every person is hidden in a group of at least five. Combinations that occur less often are coarsened or deleted.
- Is it enough to shorten the date of birth to the year of birth?
- Usually yes in large municipalities, but not in small ones. According to a Souverana calculation with FSO data (as of the end of 2025), year of birth, sex and municipality identify 0.4 per cent of residents uniquely across Switzerland, but 17 per cent in municipalities with fewer than 500 residents. There, the municipality has to be coarsened as well, for example to the district.
Share this article
Ready-formatted graphics and a suggested post for your LinkedIn feed: download, copy, post.
Suggested post
Do you pass copies of your customer database to external developers or to an AI tool after removing names and AHV numbers? The revFADP applies to all information about an identifiable person. How identifiable the people in your copy are can be calculated. We ran the calculation for all 2,115 municipalities with the population figures of the Federal Statistical Office as of the end of 2025. Date of birth, sex and municipality of residence identify 72 per cent of residents uniquely. In municipalities with fewer than 2,000 residents the figure is over 97 per cent, in the city of Zurich it is 1 per cent. Shortening the date of birth to the year of birth while keeping sex and municipality lowers the share to 0.4 per cent across Switzerland. In municipalities with fewer than 500 residents, 17 per cent then remain unique. Our conclusion: whether data are anonymous enough can be checked with three metrics. This measurement belongs at the start whenever data are to be passed to third parties or to a cloud model. In the article you look for 87-year-old Hildegard from Maschwanden in an invented patient list without names. It also contains the calculator for every municipality, three well-known cases of re-identification, the four kinds of columns in a database and the three common metrics. The PDF adds the figures per canton and a worksheet for the column inventory. Link in the comments. #DataProtection #Anonymisation #revFADP #Switzerland #AI