Spanish national identity document number (DNI)
ID es_dni
DatatypePersonal data (PII)identifierDraft
This record is a draft: it has not been reviewed yet and may be incomplete or wrong. Do not rely on it for compliance decisions. Help improve it (see CONTRIBUTING.md).
Documento Nacional de Identidad, the identity number of Spanish citizens: eight digits and a check letter, which is the number modulo 23 looked up in TRWAGMYFPDXBNJZSQVHLCKE. The same value is the person's tax number (NIF). Foreigners receive an NIE instead.
- Parent datatype
- Spanish Tax identification number
esnif - Categories
- Personally identifiable information, Person related
- Countries
- Spain
- Languages
- Spanish
- W3C DPV
pd:OfficialID- Google DLP
SPAIN_DNI_NUMBER- Microsoft Purview
Spain DNI,EU national identification number- python-stdnum
stdnum.es.dni- Check digit
es_dni- Quality
- 100/100
- Metacrafter rules
- no detection rule yet
- Supported by tools
- Amazon Macie, AWS Glue Sensitive Data Detection, Azure AI Language PII detection, Databricks Unity Catalog data classification, DataPrep, Google Cloud Sensitive Data Protection (DLP), IBM Security Guardium Analyzer, Microsoft Purview Data Loss Prevention, Nightfall AI, python-stdnum, Snowflake sensitive data classification
Regular expression
^\d{8}-?[A-Z]$
Python re syntax.
Examples
| Value | Description |
|---|---|
| 12442144H | Synthetic number with a valid check digit |
| 85103532J | Synthetic number with a valid check digit |
| 54362315-K | python-stdnum test value, with a hyphen before the letter |
| 12442144A invalid | Check letter does not match |
| 12442144H7 invalid | One character too many |
Translations
| Language | Name | Description |
|---|---|---|
| Spanish | Documento Nacional de Identidad (DNI) |
Sources
- wikipedia: https://en.wikipedia.org/wiki/Documento_Nacional_de_Identidad_(Spain)
- wikipedia: https://es.wikipedia.org/wiki/Documento_nacional_de_identidad_(Espa%C3%B1a)
- other: https://arthurdejong.org/python-stdnum/doc/2.2/stdnum.es.dni.html
- other: https://docs.dataprep.ai/user_guide/clean/clean_es_dni.html
Use this record
- Page URL:
http://registry.apicrafter.io/datatype/es_dni - JSON: API v1 · legacy shape (used by metacrafter) · Markdown (for LLMs)
- Improve it: edit
data/datatypes/ES/persons/es_dni.yamlon GitHub