> Source: https://souverana.ch/en/insights/pseudonymisierung-anonymisierung/
> Language: en

# 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.**

In brief

-   Anyone who analyses customer data with AI or hands it to an external team usually passes it to a third party. Information about people is then covered by the Swiss Data Protection Act, unless the data is truly anonymous.
-   Deleting names is often not enough: the invented patient Hildegard, 87, is the only woman of her year of birth in the village of Maschwanden and can therefore be recognised without her name. By our calculation with population figures from the Federal Statistical Office, 72 per cent of people in Switzerland are unique in their municipality by date of birth and sex alone.
-   Researchers have shown several times how such a row without a name becomes a name again. In the US, they matched hospital data, search queries and film ratings to individual people through a second source.
-   Pseudonymising means replacing names with codes that can be traced back through a list. Data is anonymous only when nobody can be identified with reasonable effort, including through attributes such as date of birth or place of residence.
-   Coarser information protects better, for example the age group instead of the date of birth or the district instead of the municipality. For outliers such as Hildegard to disappear in the crowd, however, analyses of small groups are lost, such as the older patients of one village.
-   Whether data is anonymous enough can be checked with three established measures from research. The simplest counts whether every combination of attributes such as year of birth, sex and municipality occurs several times, for example at least five times.
-   AI on customer data remains possible in three ways: anonymise as far as the purpose allows, use an AI model run in house, or commission a provider who processes the data under contract only for that assignment.
-   To start, a list of which information is to go to which recipient, and in how much detail, is enough. Then count how many combinations of attributes occur fewer than five times.

Three uses of AI on customer data are common:

1.  A language model such as ChatGPT or Claude analyses an export of the customer database in minutes.
2.  An external development team tests with a copy of the real data and finds bugs that often do not occur with invented data.
3.  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](https://souverana.ch/en/insights/anthropic-claude-datenschutz/), for example, this depends on the plan chosen.

For law firms and medical practices, [professional secrecy](https://souverana.ch/en/insights/berufsgeheimnis-cloud/) 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.

**Series · Anonymising data**

1.  Data without names: pseudonymisation or anonymisation? (this part)
2.  [Anonymised data and AI: the legal position in Switzerland](https://souverana.ch/en/insights/anonymisierung-rechtslage-schweiz/)
3.  [Protecting personal data in development, AI agents and chat](https://souverana.ch/en/insights/anonymisierung-architektur/)

## 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.

> **Interactive chart**
> 
> Invented patient list of a family practice in the Knonaueramt, 12 rows without names, with sex, birth information, place and diagnosis. The reader looks for the invented patient Hildegard (woman, born 14.03.1939, Maschwanden, heart failure). Level 1, date of birth and municipality: 1 matching row, 1 woman in the population (FSO STATPOP 31.12.2025), analysis 'women aged 85 and over from Maschwanden with heart failure': 2. Level 2, year of birth and municipality: 1 row, 1 woman, analysis 2. Level 3, age group 85 to 89 and municipality: 4 rows, 5 women, analysis 2. Level 4, age group 85 to 89 and Bezirk Affoltern: 9 rows, 526 women, analysis for Maschwanden no longer possible, only for the whole district (3). The better Hildegard is hidden, the less can be analysed about her village.

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.

> **72 %** of Switzerland's residents are identified uniquely by date of birth, sex and municipality of residence, around 6.6 million people.
> 
> 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.

**Chart: Share of unique residents by municipality size**

*Share of residents in per cent*

| Category | Sex + date of birth (%) | Sex + month and year of birth (%) |
| --- | --- | --- |
| under 500 | 99.4 | 83.8 |
| 500 to 999 | 98.7 | 68.6 |
| 1,000 to 1,999 | 97.6 | 48.7 |
| 2,000 to 4,999 | 94.5 | 21.3 |
| 5,000 to 9,999 | 88.9 | 5.4 |
| 10,000 to 19,999 | 79.5 | 1.1 |
| 20,000 to 49,999 | 60.9 | 0.3 |
| 50,000 and over | 11.8 | 0 |

Source: Own calculation with FSO STATPOP, as of 31.12.2025. Municipality size in residents.

The calculator shows the figures for all 2,115 municipalities, starting with Maschwanden. The vertical line in each bar marks the Swiss average.

> **Interactive chart**
> 
> For each of the 2,115 Swiss municipalities (FSO STATPOP, as of 31.12.2025), the calculator shows the share of residents who are unique by sex plus date of birth, month and year of birth, or year of birth only. Switzerland overall: 72 per cent, 12 per cent and 0.4 per cent. Example Maschwanden (669 residents): 99 per cent, 71 per cent and 3.7 per cent. City of Zurich: 1.2 per cent, 0.01 per cent and 0 per cent.

## 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.[10] 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.

> **Interactive chart**
> 
> Three views of the invented patient list of a family practice (12 rows, Hildegard from Maschwanden is row 1). k-anonymity: rows are grouped by sex plus the chosen attributes. With year of birth and municipality every row is its own group, k equals 1. With age group and municipality Hildegard's group has 4 rows, k stays 1, and 5 women aged 85 to 89 live in Maschwanden (FSO STATPOP 31.12.2025). With age group and district Hildegard's group has 9 rows, 526 such women live in the Bezirk Affoltern, and the two men and a 90-year-old patient still form smaller groups. l-diversity: in the real list every group of two or more rows contains at least two diagnoses. In a clearly constructed variant all four women aged 85 to 89 from Maschwanden have heart failure, so Hildegard's diagnosis is disclosed without her row being known. Differential privacy: two counts are answered with Laplace noise, women aged 85 and over from Maschwanden with heart failure (true value 2) and women aged 85 to 89 in the Bezirk Affoltern (true value 526). 9 in 10 answers lie within 23 of the true value at epsilon 0.1, 4.6 at 0.5, 2.3 at 1 and 0.5 at 5. For Maschwanden the noise swallows the result; for the district it hardly matters.

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](https://souverana.ch/en/insights/llm-selbst-hosten/) 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.

1.  **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.
2.  **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.
3.  **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.
4.  **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.

You want to give data to developers, agents or cloud models and need an architecture that fits the purpose?

[AI architecture & solution selection](https://souverana.ch/en/leistungen/ki-architektur/)

## Sources

[1] U.S. Census Bureau. «Understanding Differential Privacy». 18 June 2026. [www.census.gov/programs-surveys/decennial-census/decade/2020/planning-management/process/disclosure-avoidance/differential-privacy.html](https://www.census.gov/programs-surveys/decennial-census/decade/2020/planning-management/process/disclosure-avoidance/differential-privacy.html). Behördenangabe.

The author

Joel Barmettler

AI Architect · Souverana, Zurich

Joel Barmettler guides Swiss companies from AI strategy to integration: sovereign, confidential and production-ready. He built the Swiss AI Hub as its architect and today co-owns its architecture; he personally leads every Souverana mandate. Mandates from one-person firms to Fortune 500 corporations.

[Book an intro call](https://meet.brevo.com/joel-barmettler/30-minute-meeting) [More about Souverana](https://souverana.ch/en/) [LinkedIn](https://www.linkedin.com/in/joel-barmettler-b9ab361b7)

## 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.

## Glossary

-   **Anonymisation**: Changing data so that no person can be identified with reasonable effort any more, not even indirectly. Anonymous data are no longer personal data; the revFADP does not apply to them.
-   **Personal data**: Any information relating to an identified or identifiable person, so customer records, HR files or even an email address. As soon as such data is involved, the revFADP applies.
-   **revFADP (revDSG)**: Switzerland's revised Federal Act on Data Protection, in force since 1 September 2023. It governs how companies may process personal data, and applies to AI use exactly as it does to any other processing.
-   **Pseudonymisation**: Names and numbers are replaced by substitute values and the mapping is kept separately. Anyone holding the key, or finding the person through other attributes, can re-link them. Pseudonymised data therefore usually remain personal data.
-   **Re-identification**: Finding a person again in data from which name and numbers were removed, usually by linking it to a second source that contains names.
-   **Masking**: Individual values are hidden or falsified, such as «Ke\*\*\*» instead of «Keller» or an invented phone number. Masking is a technique; whether the result is anonymous or only pseudonymous depends on the remaining columns.
-   **Synthetic data**: Artificially generated records that reproduce the statistical properties of real data without containing real people. A generator that learns too precisely can, however, reproduce real records.
-   **Quasi-identifier**: An attribute that identifies nobody on its own but does in combination with others: date of birth, sex, place of residence, occupation. Such attributes allow records to be linked to other sources.
-   **k-anonymity**: A dataset is k-anonymous when every combination of quasi-identifiers occurs at least k times. With k = 5, every person disappears in a group of at least five.
-   **l-diversity**: An extension of k-anonymity: within each group at least l different values of the sensitive attribute must occur, such as different diagnoses. Otherwise the group reveals the attribute even if it does not reveal the person.
-   **Differential privacy**: A mathematical protection measure for analyses: results receive precisely calibrated noise, so they come out almost the same whether or not a given person is in the data.
-   **Professional and official secrecy**: The criminally protected duty of confidentiality of authorities (official secrecy, Art. 320 of the Swiss Criminal Code) and a list of professions named in the law (Art. 321), such as lawyers, doctors and pharmacists. It applies independently of data protection law and reaches further. Banking secrecy sits separately in the Banking Act.
