Glasa Lab / Blog / Privacy

How to anonymise company data before selling it for AI training

Where personal data hides in Slack exports, tickets, code and documents, why swapping names for codes is not anonymisation, which tools help, and how to test whether someone could still be identified.

By Glasa Lab TeamPublished Updated 16 min read

To anonymise company data for AI training, you remove or transform everything that could identify a person, directly or in combination with other information, until identification is no longer reasonably likely for anyone, including the buyer. In practice that means four jobs: find every place personal data sits, transform it (remove, replace with consistent pseudonyms, generalise or aggregate), test the result against a realistic attacker, and back the technical work with contract terms. Most company datasets end up pseudonymised rather than truly anonymous, and that is fine as long as you know which one you have and treat it accordingly under the GDPR.

Key takeaways

  • Pseudonymised data is still personal data while anyone, including you, can link it back. The EU's data protection regulators have said so since 2014 and repeated it in 2025.
  • Names are the easy part. Job titles, team sizes, dates, writing style and the content of a message identify people at least as often as their names do.
  • Automated PII detection misses things. Even the tool vendors say so. Measure what your pipeline misses on a hand-checked sample before you trust it.
  • Models can memorise. Anything that survives your clean-up can, in principle, come back out of a trained model. Clean as if that will happen.
  • Write it down. A short de-identification report is one of the first documents an AI buyer's diligence team asks for.

Why does AI training raise the bar for anonymisation?

Because a trained model can repeat what it saw. When you share a spreadsheet with an auditor, the risk ends when the auditor deletes the file. When your data trains a model, fragments of it may live on in the weights and surface in answers to strangers.

This is not hypothetical. In a 2021 paper, Carlini and colleagues extracted hundreds of verbatim sequences from GPT-2's training data, including names, phone numbers and email addresses. A later Microsoft Research study by Lukas and colleagues looked specifically at personally identifiable information (PII) in fine-tuned language models. Its conclusion is the one every seller should remember: "Scrubbing techniques reduce but do not prevent the risk of PII leakage." Even sentence-level differential privacy, a much stronger technique, "still leaks about 3% of PII sequences" in their experiments.

Regulators have joined the dots. In Opinion 28/2024 the European Data Protection Board (EDPB) said AI models trained on personal data "cannot, in all cases, be considered anonymous", and that supervisory authorities can, where proportionate, order deletion of a dataset or even the model built from it. That is why buyers care so much about how you cleaned the data: their model inherits your mistakes.

There is a commercial angle too. Buyers pay for context: threads, hand-offs, the reasons behind decisions. Deleting every proper noun destroys it. The goal is to remove identity while keeping structure.

What is the difference between pseudonymisation and anonymisation under GDPR?

Anonymous data falls outside the GDPR. Pseudonymised data does not. The difference turns on whether anyone can still link the data back to a person using means "reasonably likely" to be used.

What the law says

Article 4(5) of the GDPR (and the UK GDPR, which uses the same wording) defines pseudonymisation as processing personal data so it "can no longer be attributed to a specific data subject without the use of additional information", provided that information "is kept separately" and protected. Replacing "Sarah Okafor" with "EMP-0412" and keeping the lookup table on your own server is the textbook case.

Recital 26 explains that the GDPR does not apply to "anonymous information", meaning data "rendered anonymous in such a manner that the data subject is not or no longer identifiable". To judge identifiability, you account for "all the means reasonably likely to be used, such as singling out", by the controller or by anyone else, considering cost, time and available technology.

What the regulators say

The Article 29 Working Party, the predecessor of the EDPB, put it bluntly in its 2014 Opinion on anonymisation techniques: "pseudonymisation is not a method of anonymisation. It merely reduces the linkability of a dataset with the original identity of a data subject". The same opinion makes a point that catches out many sellers. If a company keeps the original, identifiable records and hands over a masked copy, "the resulting dataset is still personal data".

The EDPB's Guidelines 01/2025 on pseudonymisation, adopted in January 2025, repeat that pseudonymised data which could be attributed to a person with additional information "remains information related to an identifiable natural person, and thus is personal data". The guidelines are not all bad news for sellers. They say the risk reduction from pseudonymisation "may enable controllers to rely on legitimate interests" as a legal basis, and can help show that a new use is compatible with the original purpose.

The Court of Justice of the EU then added nuance. In EDPS v SRB (Case C-413/23 P, judgment of 4 September 2025), it held that pseudonymised data is not necessarily personal data for a recipient who has no means reasonably likely to re-identify anyone. For the seller who keeps the key, it remains personal data, and transparency duties are judged from the seller's side at the time of collection.

The UK Information Commissioner's Office (ICO) takes a similar line. It treats identifiability as a spectrum, says pseudonymised data is personal data in the hands of whoever holds the additional information, and asks organisations to apply a "motivated intruder" test. Its anonymisation guidance is under review following the Data (Use and Access) Act 2025, so check the current version before relying on it.

QuestionPseudonymised dataAnonymous data
Can anyone link it back to a person?Yes, whoever holds the key or other additional informationNo one, using means reasonably likely to be used
Is it personal data for the seller?YesNo
Is it personal data for the buyer?Usually yes; possibly not if the buyer has no reasonable means to re-identify (EDPS v SRB)No
Do you need a lawful basis and transparency to share it?YesFor the anonymising step itself, yes; not for the anonymous output
Typical techniquesConsistent codes, keyed hashing, tokenisation, encryptionAggregation, heavy generalisation, suppression, noise, synthetic replacement, often combined
Keeps thread and record structure?Yes, which is why buyers like itOften not, which is why buyers find it less useful

One more legal point that people skip: anonymising data is itself processing of personal data. The Working Party said "Anonymisation constitutes a further processing of personal data", so the clean-up needs its own lawful basis and should sit inside your records of processing. Our guide to whether it is legal to sell company data for AI covers lawful basis, legitimate interests and notices in detail.

Our view: for Slack, email and tickets, plan for well-built pseudonymisation plus strong contract controls. Claiming "anonymous" when you mean "pseudonymised" is what causes trouble later.

How does re-identification actually happen?

Almost never by someone reversing your codes. It happens by combining the details you left in with something the attacker already knows.

The research record here is long. In a 2000 working paper, Latanya Sweeney found that "87% (216 million of 248 million) of the population in the United States had reported characteristics that likely made them unique based only on {5-digit ZIP, gender, date of birth}." In 2008 Narayanan and Shmatikov showed that an adversary "who knows only a little bit about an individual subscriber" could find that person's record in the supposedly anonymous Netflix Prize ratings data. In 2019 Rocher, Hendrickx and de Montjoye estimated that "99.98% of Americans would be correctly re-identified in any dataset using 15 demographic attributes."

The Working Party's 2014 opinion gives a useful vocabulary for the three ways it goes wrong:

  • Singling out: isolating the records that belong to one person, even without a name. "The only engineer in the Leeds office" is singled out.
  • Linkability: connecting two records about the same person, inside your dataset or across datasets. A pseudonym that is consistent across Slack and the HR system links them by design.
  • Inference: deducing, "with significant probability", an attribute from other attributes. If every message from one pseudonym stops for six months after a thread about parental leave, you have inferred something sensitive.

What makes company data especially risky

Company data is small-world data: small teams, roles listed on LinkedIn, dated events. Patterns we see repeatedly:

  • Roles that are unique. There is one CFO. Generalising "CFO" to "finance" does not help if finance has two people.
  • Signatures and sign-offs. Email signatures carry name, title, phone and office address, often in an image the text scanner never reads.
  • Quoted replies and forwards. You redact the sender, then the same name appears three times in the quoted thread underneath.
  • Nicknames and handles. "Thanks Bobby" and "@rkumar" do not look like names to a detector trained on full names.
  • Third parties. Customers, candidates and suppliers mentioned in passing are personal data too, and you have no relationship with them.
  • Metadata. File paths like /Users/jsmith/, document author fields, EXIF data in photos and commit author emails.
  • Content itself. A support ticket describing a rare medical device fault at a named hospital identifies the patient without a single name in it.

Step 1: Where does personal data live in company data?

Start with an inventory, not a tool. List every system in scope, every field, and every free-text area, then mark what kind of personal data each one can hold. The table below is the starting map we use for common company sources.

SourceObvious identifiersLess obvious ones
Slack, Teams and chat exportsDisplay names, user IDs, emails in profiles@mentions, nicknames, reactions, shared files, DMs, status messages, channel names like #team-sarah
Email archives (mbox, PST, .eml)From, To, Cc headers, signaturesQuoted replies, forwarded chains, attachments, calendar invites, IP addresses in received headers
Support tickets and CRMCustomer name, email, phone, account IDOrder numbers, addresses in free text, screenshots, call recordings and transcripts
Source code and repositoriesCommit author names and emailsTest fixtures copied from production, logs in issues, customer names in branches and config
Documents (DOCX, PDF, slides)Names in textAuthor and "last modified by" metadata, tracked changes, comments, embedded images
CAD and engineering filesAuthor fields in file propertiesTitle blocks with drawer and checker initials, client names, site addresses
HR, finance and project toolsEmployee records, salaries, payee detailsLeave and absence patterns, performance notes, expense descriptions

The main decision here is what to exclude entirely. HR records, DMs, legal and board channels and health information are rarely worth the risk, and Article 9 special category data needs a separate legal condition anyway. Exclusion is the cheapest de-identification there is. For source code, our guide to selling source code covers rewriting commit identities with a mailmap.

Step 2: Which de-identification techniques should you use?

Use a combination, matched to each field. No single technique handles names, dates, free text and rare attributes at once.

TechniqueWhat it doesGood forWatch out for
SuppressionDeletes a field, record or whole filePhone numbers, home addresses, attachments you cannot review, sensitive channelsOver-use strips context buyers want
Consistent pseudonymsReplaces each person or company with a stable code everywhere it appearsNames, user IDs and emails in threads, tickets and commitsStill personal data while the key exists; consistency across sources increases linkability
Keyed hashing (HMAC) or tokenisationDerives the pseudonym from the original with a secret keyGenerating stable codes at scale without storing a full lookup tableUnkeyed hashes of emails or IDs can be reversed by hashing a list of guesses
GeneralisationReplaces exact values with ranges or categoriesDates to month or quarter, locations to region, titles to job familyDoes not help if a category has one member
Date shiftingMoves all dates for one entity by the same random offsetKeeping intervals and sequence while hiding real datesPublic events (product launches, outages) can reveal the offset
Aggregation and k-anonymityGroups records so each is indistinguishable from at least k othersTabular data, metrics, survey-style recordsThe Working Party notes k-anonymity "does not prevent inference attacks"
Differential privacyAdds calibrated noise so outputs reveal little about any one personStatistics and some model training set-upsHard to apply to raw text you are delivering; mostly a buyer-side technique

Pseudonym design that keeps value

Buyers want to follow a person through a thread and across a project, so the same person needs the same code everywhere. Let codes carry only what you are happy to reveal, such as a role family ("ENG-17"), never initials or employee numbers.

Generate them with a keyed function rather than a plain hash. The EDPB guidelines advise that where hash functions are used as building blocks, it is "advisable to use specialized hash functions designed for secure password authentication", and that the secret keys ("pseudonymisation secrets") must be kept separately and protected. In plain terms: an attacker can hash every email address at your domain and match the results to an unkeyed SHA-256 column in minutes. Keep the key on your side, never in the delivery, and decide in advance whether you will destroy it.

Should you destroy the key?

Destroying it moves you closer to anonymity but does not get you there if the content still identifies people, and it stops you honouring later removal requests. Most sellers keep the key in-house under tight access control and say so in the contract.

Why is free text the hardest part?

Because identity in free text is contextual, and detectors work on patterns. One Slack message can hold a nickname, a customer's address and a diagnosis. What works in practice:

  1. Replace known identities first. Build a directory from your own systems (staff list, Slack users, CRM contacts) and replace every known name, handle and email deterministically. This catches far more than a statistical detector, because you already know who is in the data.
  2. Then run a detector for what the directory missed: third-party names, phone numbers, addresses, card numbers, national IDs, IP addresses.
  3. Handle structure explicitly. Strip or rewrite quoted replies, signatures and forwarded headers with rules rather than hoping the detector catches them.
  4. Treat attachments separately. Images, PDFs and screenshots need OCR or exclusion. If you cannot review a file type, drop it.
  5. Measure recall on a gold sample. Have two people hand-label every identifier in a few hundred randomly chosen messages, run your pipeline, and count what it missed. Repeat until the miss rate is one you can defend, and keep the numbers for your report.

Our organisational data page shows the kind of cross-system records buyers want, and why consistent pseudonyms matter to them.

What tools help with de-identification?

Tools speed up the work, but none decides whether your output is anonymous. The ones we see most:

  • Presidio (open source, originally from Microsoft). It has an analyzer for "PII identification in text", an anonymizer that applies operators such as redact, replace, hash or encrypt, an image redactor using OCR, and a module for structured data. Its documentation is candid: "there is no guarantee that Presidio will find all sensitive information." Plan for additional safeguards.
  • Google Cloud Sensitive Data Protection (formerly Cloud DLP). It detects built-in "infoTypes" and applies transformations including redaction, masking, cryptographic hashing, format-preserving tokens and date shifting. Its date-shifting feature keeps the sequence and duration of events for each entity while hiding the real dates.
  • ARX, an open-source tool for anonymising structured data. It supports a range of privacy and risk models and lets you study "output data utility and residual re-identification risks". Useful for tabular exports such as CRM or HR-derived metrics.
  • git-filter-repo for repositories, to rewrite author names and emails across history and remove files. Pair it with a secret scanner; see our source code guide.

For process, NIST Special Publication 800-188, De-Identifying Government Datasets: Techniques and Governance (September 2023), is the most thorough free reference. It is written for US agencies, and it warns that "not all tools that merely mask personal information provide sufficient functionality for performing de-identification." If anyone proposes differential privacy for your use case, NIST SP 800-226 (March 2025) explains how to evaluate the guarantees and lists common "privacy hazards".

Step 3: How do you test re-identification risk?

Attack your own output before a buyer or a regulator does.

The motivated intruder exercise

The ICO's motivated intruder is a reasonably competent person with ordinary resources, such as the internet, public records and social media, who wants to identify someone. They are not assumed to have specialist skills or insider knowledge. Ask a colleague who did not run the pipeline to play that role with a random sample: can they work out who a pseudonym is from LinkedIn, the company website and the content itself? Then ask a harder question: what could a former employee work out? Insiders are the realistic threat for company data.

Uniqueness checks and residual scans

For structured fields, count how many records share each combination of role, team, location and start year; groups of one or two are a singling-out risk. Then run a second, different detector over the final output and search it for every staff surname, your email domain and known customer names. Anything found becomes a new pipeline rule.

Write the de-identification report

Keep it short and factual: scope, exclusions, techniques per field, tools and versions, gold-sample recall figures, the intruder test and what it found, who holds the key, and the residual risks you accept. This is the document a buyer's privacy team will ask for, and the evidence you would want if a regulator asked later. Our guide to preparing a dataset for AI buyers shows where it fits in a data room.

Step 4: What contract controls should back up the technical work?

Technical measures reduce risk; contracts deal with what is left. Because most company datasets remain pseudonymised, the licence should ban re-identification and linking with other data, confirm the buyer never receives the key, limit onward sharing to named subcontractors, require output safeguards such as deduplication and filters, set deletion dates with written confirmation, and fix the GDPR roles (usually separate controllers) and any transfer mechanism. Our guide to AI data licensing deal terms covers these clauses in depth.

What are the most common anonymisation mistakes?

The same handful come up again and again. Sellers call pseudonymised data "anonymous" in contracts and notices. They use unkeyed hashes that a dictionary attack reverses. They clean message bodies but not file properties, attachments and headers. They send a "quick sample" before the pipeline is finished, forgetting that a sample is a disclosure like any other. And they keep no record of what was done, so nobody can answer the buyer's diligence questions six months later.

If you are earlier in the process, start with our guide to selling company data to AI labs. When your data is ready, you can tell us about it or browse what buyers already see on the marketplace.

Disclosure: Glasa Lab is a data broker and runs de-identification for companies that license data through us. We have tried to describe the methods and their limits neutrally, whichever route you choose.

This guide is general information, not legal advice. It refers to UK and EU data protection law and US research, which differ and change; the ICO's anonymisation guidance is under review following the Data (Use and Access) Act 2025. Whether data is anonymous depends on your facts. Have a qualified privacy lawyer or data protection officer review your approach before you share any data.

FAQ

Is pseudonymised data anonymous under GDPR?

No. Pseudonymised data remains personal data for anyone who can link it back to a person, including the seller who holds the key. The CJEU held in 2025 that it may not be personal data for a recipient with no reasonable means of re-identification, but that does not change the seller's own obligations.

Is removing names and email addresses enough?

Rarely. People are identified through roles, locations, dates, signatures, quoted replies and the content of messages. You need to deal with those indirect identifiers and test the result, not just strip direct ones.

Can I hash email addresses to anonymise them?

A plain hash is not anonymisation. Anyone can hash a list of likely addresses and match them. Use a keyed function with a secret you keep, and treat the result as pseudonymised data.

What is the motivated intruder test?

It is the ICO's test for identifiability: could a reasonably competent person, using ordinary resources such as the internet and public records, identify someone from the data? It assumes no specialist hacking skills, but for company data you should also consider what a former employee could work out.

Do I still need a lawful basis if I anonymise the data?

Yes, for the anonymisation itself, because transforming personal data is processing. Truly anonymous output falls outside the GDPR, but pseudonymised output does not, so you also need a lawful basis and transparency for the disclosure.

Sources

  1. Regulation (EU) 2016/679 (GDPR), Article 4(5), Article 9 and Recital 26. eur-lex.europa.eu
  2. UK GDPR, Article 4, definitions. legislation.gov.uk
  3. Article 29 Data Protection Working Party, Opinion 05/2014 on Anonymisation Techniques (WP216), adopted 10 April 2014. ec.europa.eu
  4. European Data Protection Board, Guidelines 01/2025 on Pseudonymisation, version for public consultation, adopted 16 January 2025. edpb.europa.eu
  5. European Data Protection Board, Opinion 28/2024 on certain data protection aspects related to the processing of personal data in the context of AI models, adopted 17 December 2024. edpb.europa.eu
  6. A&O Shearman, "CJEU clarifies concept of personal data for a transfer of pseudonymised data to third parties" (on Case C-413/23 P, EDPS v SRB, judgment of 4 September 2025), 19 September 2025. aoshearman.com
  7. Information Commissioner's Office, "Anonymisation: How do we ensure anonymisation is effective?", accessed 23 November 2026. ico.org.uk
  8. Information Commissioner's Office, "Anonymisation: Pseudonymisation", accessed 23 November 2026. ico.org.uk
  9. Carlini et al., "Extracting Training Data from Large Language Models", arXiv:2012.07805, December 2020 (USENIX Security 2021). arxiv.org
  10. Lukas, Salem, Sim, Tople, Wutschitz and Zanella-Béguelin, "Analyzing Leakage of Personally Identifiable Information in Language Models", arXiv:2302.00539, February 2023. arxiv.org
  11. Latanya Sweeney, "Simple Demographics Often Identify People Uniquely", Carnegie Mellon University, Data Privacy Working Paper 3, 2000. dataprivacylab.org
  12. Narayanan and Shmatikov, "How To Break Anonymity of the Netflix Prize Dataset", arXiv:cs/0610105. arxiv.org
  13. Rocher, Hendrickx and de Montjoye, "Estimating the success of re-identifications in incomplete datasets using generative models", Nature Communications 10, 3069 (2019). pmc.ncbi.nlm.nih.gov
  14. NIST Special Publication 800-188, "De-Identifying Government Datasets: Techniques and Governance", September 2023. csrc.nist.gov
  15. NIST Special Publication 800-226, "Guidelines for Evaluating Differential Privacy Guarantees", March 2025. csrc.nist.gov
  16. Presidio documentation, accessed 23 November 2026. presidio.dataprivacystack.org
  17. Google Cloud, Sensitive Data Protection, "Transformation reference" and "Date shifting", accessed 23 November 2026. docs.cloud.google.com
  18. ARX Data Anonymization Tool, project site, accessed 23 November 2026. arx.deidentifier.org
  19. git-filter-repo, manual page, accessed 23 November 2026. github.com

About Glasa Lab

Glasa Lab is a data broker. We help companies prepare and license their organisational data, CAD and engineering archives, text corpora and logs to AI teams, and we handle the rights checks, de-identification and contracts along the way. We also supply datasets and RL environments to AI labs.

Updated 23 November 2026: first published.

Have data AI labs need?

List Your Data