Spanish DNI and NIE: anonymize them before ChatGPT or sharing
The Spanish DNI and NIE (Spain) are the national identity numbers of Spanish citizens (DNI) and of foreign residents (NIE). They are also the tax number (NIF) of individuals. They turn up in documents people want to share or give to an AI assistant, and they should never go out as they are.
Format
Section titled “Format”DNI: 8 digits and a control letter (12345678Z). NIE: X, Y or Z, 7 digits and a control letter (X1234567L). The letter is the number modulo 23.
What it reveals
Section titled “What it reveals”Nothing by itself, but it is the key to a person in every Spanish register: tax, health, banks, employers, notaries.
Where you’ll find it
Section titled “Where you’ll find it”Contracts, invoices, payslips, employment contracts, medical and insurance forms, notarial deeds, court documents.
How Piixie finds it
Section titled “How Piixie finds it”Piixie has a dedicated rule for it, in every model including Lite: it matches the format and checks the control digits, so random numbers of the same length aren’t flagged and real ones aren’t missed. The local LLM also reads the context around it.
What it becomes
Section titled “What it becomes”With Synthesize, a fake of the same kind with correct check digits, consistent everywhere the same number appears. With Redact, a black box or [REDACTED]; with Replace, a placeholder such as [ID_1].
All of it happens on your computer: the document is never uploaded to find the numbers. See why a local LLM.