Anonymize a CSV file for test data
A CSV export is the quickest way to get realistic data into a test system or an AI chat: "find the duplicates in this customer list", "write an import script for this file". It is also a complete copy of the personal data in it, row by row.
Two kinds of columns
- Columns that are personal data as a whole: name, email, phone, street, date of birth, customer number. Every value in them should go, whatever it looks like.
- Free-text columns: notes, comments, descriptions. Mostly harmless, but now and then a name, a phone number or an IBAN turns up in them.
Pattern detection alone handles the first kind poorly: a surname column contains many names that are also common words, and a customer number has no standard format. That is why the Anonymizer's Table (CSV) preset lets you pick whole columns to replace, and runs the normal detection over everything else.
Step by step
- Export the table as CSV (or TSV). Keep the header row: the column picker reads the column names from it.
- Open the anonymizer with the Table (CSV) preset and choose Open file. The file is read by your browser, not uploaded; files up to 5 MB fit.
- Under the text, tick the columns to replace entirely, every row below the header.
- Review the findings in the other columns, and add identifiers of your own (account names, internal codes) to the custom terms list.
- Download the result. It keeps the delimiter and the columns, so it imports where the original did.
Which replacement to choose
- Fake data, the preset's default, for test data: the file still looks real, an email column still holds valid email addresses, and an IBAN column IBANs that pass their check.
- Hashes where you need to join or count: the same customer gets the same code in every row and in every file you anonymize the same way.
- Placeholders for an AI chat whose answer refers back to rows you want to restore.
Before you use it as test data
- Combinations of the columns you kept can still single people out: a rare postcode with a birth year and a job title. Drop or coarsen what the test doesn't need.
- A smaller sample is often enough and leaks less. Cut the file to the rows the test needs before you anonymize it.