Accountants and finance teams: anonymizing invoices and bank statements
What to mask on invoices, bank statements and payroll exports before sharing: IBANs, card numbers, VAT IDs, sole traders, and totals that still add up.
Before a financial document leaves your team, mask what points to a person or a deal. Keep what the reader needs to check the numbers. On invoices, that means names, addresses, bank details and sole traders' tax numbers. On bank statements, it also means the names and references in each transaction line. Always work on a copy.
This guide follows the EU GDPR, with UK pointers, as of September 2026. It is not legal advice.
Who asks for your financial documents, and what do they need?
Article 5(1)(c) of the GDPR limits personal data to what is necessary for the purpose. So ask one question: what must this reader check? The answer changes from one reader to the next.
| Reader | What they need | Mask before sharing |
|---|---|---|
| Software vendor fixing an import | Layout, columns, date and number formats | Names, IBANs, VAT numbers, addresses |
| Trainee learning bank reconciliation | Realistic lines and matching totals | Every name, account and reference |
| Consultant checking sample invoices | Amounts, dates, VAT rates | Contact persons, bank details |
| AI tool sorting expenses | Categories and amounts | Names, card numbers, IBANs, addresses |
Which identifiers hide in invoices, statements and payroll exports?
Invoices carry identifiers by law. Article 226 of the EU VAT Directive lists what a VAT invoice must show. That includes the full name and address of the seller and the customer, and the seller's VAT number. In some cases, such as intra-EU supplies of goods, the customer's VAT number appears too.
| Document | Obvious identifiers | Easy to miss |
|---|---|---|
| Invoice | Names, addresses, VAT numbers, IBAN | Contact person, footer email, a project name in the order reference |
| Bank statement | Account holder, IBAN, BIC | Names and references in each line |
| Expense report | Employee name, card number | Hotel city, travel dates, meal guests |
| Payroll export | Names, national insurance numbers, IBANs | Salary, absence codes, a job title held by one person |
Is company data personal data?
Not in principle. Recital 14 of the GDPR says the regulation does not cover data about legal persons, including their name, legal form and contact details. But the ICO, the UK regulator, says information about sole traders, employees, partners and company directors may be personal data when it relates to them as individuals.
Sole traders are the trap. GOV.UK says a sole trader's invoice must include their name. Take an invoice from Jane Example, a freelance bookkeeper. Her trading name, VAT number and bank details all point to her. Treat them as personal data.
Why can a partly masked IBAN still identify someone?
An IBAN has a fixed structure. The Deutsche Bundesbank says a German IBAN has 22 characters: DE, two check digits, an eight-digit bank sort code and a ten-digit account number. According to the Banque de France, a French IBAN has 27 characters, including a bank code and a branch code. The start names the bank. The end holds the account.
- Hiding only the middle can leave the bank, the branch and part of the account visible.
- Two copies masked in different places can be pieced back into the full number.
- The holder's name printed next to a masked IBAN defeats the masking.
- The same IBAN often sits in payment terms, reminders and statements. Mask every copy.
What does PCI DSS say about masking card numbers?
PCI DSS is the card industry's security standard. According to the PCI Security Standards Council's FAQ 1492 (April 2024), requirement 3.4.1 allows no more than the BIN and the last four digits on screens and reports, unless a documented business need justifies more. The BIN is the first six digits, or eight for some card brands, as the Council explained in 2021.
FAQ 1146 separates two ideas. Masking hides digits on display, and a masked number could be unmasked. Truncation removes digits for good. FAQ 1091 warns that access to different truncated formats of the same card number greatly increases the ability to rebuild it. So show only the digits the reader needs, often none, in one format everywhere.
How do you keep a masked document useful?
- Copy the file. Mask the copy, never the original.
- Ask the reader what they must check: totals, VAT, dates or layout.
- Mask what identifies people: names, addresses, IBANs, card and tax numbers.
- Keep amounts, dates, VAT rates and line structure if the reader recomputes them.
- Replace counterparties with consistent labels, such as Supplier A.
- If an amount is itself confidential, mask it wherever it can be worked out.
- Export a flattened copy, such as an image-only PDF, then try to copy text from the masked areas.
Watch the VAT line. You hide a net amount but leave a 20% rate and €9,750 of VAT. Anyone can work out the net: €48,750. A contract price may also sit in a total, a payment line and a reminder. Mask every one.
Keep the original anyway. In the UK, HMRC says businesses must generally keep VAT records for at least 6 years. A masked copy does not replace that duty. Once exported, it cannot be turned back into the original.
Which tools mask financial documents properly?
A black shape drawn over a PDF does not remove the text. The ICO lists this as an ineffective technique to avoid. Adobe's documentation says the Redact tool in Acrobat Pro, Premium or Studio permanently removes content and can remove hidden data such as metadata. For payroll exports in Excel, Microsoft says Document Inspector removes hidden rows and columns, except in a table header, a list header or a PivotTable, which it unhides instead. Better still, delete the columns you do not share.
ONYRI Sanitize is one option for PDFs, Word files and scans. Detection and masking run inside the browser, so the file is not uploaded, and the export is always flattened. It looks for IBANs, BICs, card numbers checked with the Luhn algorithm, VAT and tax numbers, and amounts with a currency. The Pro plan adds token mode, with consistent labels. Company names are detected only with a legal form attached (SAS, SARL, Ltd, Inc.…); salaries as such still have no detector. Add missing terms yourself, then review the preview before downloading.
Frequently asked questions
Is a masked invoice anonymous?
Not always. If you keep a key linking labels such as Supplier A to real names, the copy is pseudonymized. Recital 26 of the GDPR says pseudonymized data is still information about an identifiable person. A rare amount or date can also point back to someone.
Can I leave the last four digits of an IBAN visible?
Often, yes, when the reader needs to tell accounts apart. Four final digits alone reveal little. The risk comes from showing more, or from copies that each show a different part. Pick one format for every document.
Should I mask the BIC?
A BIC identifies a bank, not a person. The ECB defines it as an international standard for identifying institutions in the financial services industry. Keep it if the reader needs the bank. Otherwise mask it: it still shows where someone banks.
Do I have to mask salaries in a payroll export?
If the reader can link a salary to a person, it is personal data. Replace names with staff numbers and remove ID numbers and IBANs. In a small team, a job title plus a salary can still single out one person. Drop or group those columns if the reader does not need them.
Sources & references
- Regulation (EU) 2016/679 (GDPR): Recitals 14 and 26, Article 5(1)(c)EUR-Lex
- Council Directive 2006/112/EC (VAT Directive), Article 226EUR-Lex
- What is personal information: a guideInformation Commissioner's Office (ICO), UK
- Invoicing and taking payment from customers: what invoices must includeGOV.UK
- IBAN rulesDeutsche Bundesbank
- RIB, IBAN et BIC : les petits noms de vos coordonnées bancaires (in French)Banque de France
- Glossary: Business Identifier Code (BIC)European Central Bank
- FAQ 1492: PAN masking and truncation with 8-digit BINs (April 2024)PCI Security Standards Council
- FAQ 1146: What is the difference between masking and truncation?PCI Security Standards Council
- FAQ 1091: What are acceptable formats for truncation of primary account numbers?PCI Security Standards Council
- 8-digit BINs and PCI DSS: What You Need to Know (2 September 2021)PCI Security Standards Council blog
- Record keeping for VAT (VAT Notice 700/21), section 2.4HM Revenue and Customs, GOV.UK
- How do we avoid an accidental breach when redacting information?Information Commissioner's Office (ICO), UK
- Redact sensitive information in a PDF (Acrobat tutorial)Adobe
- Remove hidden data and personal information by inspecting documents, presentations, or workbooksMicrosoft Support