How to anonymize a CSV or Excel file before sharing it
What to hide, the difference between masking and anonymizing, and how to do it without uploading the file anywhere.
By Shahzad Ali ·
The short answer
To anonymize a CSV, Excel or JSON file before you share it, replace or remove every value that points to a person: names, email addresses, phone numbers, ID numbers, bank account and card numbers, addresses and dates of birth. Keep only the columns the other person needs, then check the result before you send it.
What counts as personal data in a spreadsheet
Some columns identify a person on their own; others only do so together. Look for both:
- Direct identifiers: full names, email addresses, phone numbers, national ID and residence permit numbers, passport numbers, IBANs and card numbers.
- Quasi-identifiers: date of birth, street address, postcode, job title, employer. One of them rarely names anyone, but three together often do.
- Free text: notes, comments and descriptions that mention a customer by name or paste in their email or phone number. These are the values people miss most often.
Masking, pseudonymization and anonymization
Masking is the general word for hiding real values. Replacing each value with a consistent token, such as EMAIL-000001 for the same address wherever it appears, is pseudonymization: rows can still be matched and counted, and whoever holds the key can turn the tokens back into the original values.
Removing a column, or hiding all but a few characters (****1234), cannot be undone, and it is closer to anonymization. Data protection laws often still treat pseudonymized data as personal data, so if your organization has a data protection or compliance contact, ask them which level a given file needs. This guide explains the techniques; it is not legal advice.
How to mask a file in your browser, step by step
The Mask data tool does this on your device: the file is not uploaded.
- Open the Mask data page and choose your CSV, Excel, JSON or TXT file, or press Mask in the CSV, Excel or JSON viewer while the file is open.
- Check the columns it picked. Names, emails, phone numbers, IDs, IBANs, card numbers, addresses and dates of birth are ticked for you; open Columns to add anything it missed.
- Choose a method for each column: tokens to keep rows matchable, a partial mask to keep the last digits, or removal.
- Look at the preview of the first 20 rows, then download the masked copy as CSV, Excel or JSON.
- If you will need the real values back, also download the private key and keep it apart from the masked file.
Before you paste a file into an AI assistant
Mask the file first and paste the masked copy into ChatGPT, Claude, Gemini or any other assistant. Consistent tokens keep the analysis useful: the assistant can still count orders per customer or spot duplicates, because the same customer always has the same token. When it answers with tokens, such as "the rows with EMAIL-000017 have three returns", open the Restore tab with the private key to turn a masked file back into real values on your own computer.
Doing it by hand in Excel
For a small file you can mask by hand: delete the columns nobody needs, replace a name column with a formula such as ="Customer "&ROW(), and use Find and Replace for known values. It works, but it is easy to miss a name inside a notes column, the same person gets different stand-ins in different sheets, and nothing records how to undo it.
Check the result before you send it
Open the masked copy and search it before it leaves your computer:
- Search for "@" to catch email addresses that remain.
- Search for long runs of digits to catch phone, ID, account and card numbers.
- Read a few rows of every free-text column.
- Make sure the private key is not attached to the same email or uploaded with the file.
Questions?
Write to support@openanydoc.com if a column was not found that should have been (describe it; no real data).