Coverage · Denmark
Danish CPR number detection and redaction
OpenAnonymizer finds the Danish CPR number in text and replaces it with a placeholder when its official label confirms it. It runs on a CPU, with no GPU and no API calls.
At a glance
- Country
- Denmark DK
- Format
- CPR numberCPR-nummer (personnummer)
- Placeholder
- Each distinct value gets its own number: NATIONAL_ID_1, NATIONAL_ID_2, and so on. Formats from other countries use the NATIONAL_ID placeholder too.
- How it is confirmed
- Official label
- Used for
- Identifying everyone in the Danish Civil Registration System, for tax, health care, banking and public services.
About the CPR number
The number is 10 digits, written DDMMYY-SSSS: the date of birth and a sequence number whose first digit helps give the century.
CPR numbers used to satisfy a modulus 11 check. Since 2007 some numbers are issued without it, so a check digit cannot be relied on.
How OpenAnonymizer handles it
Confirmed by its label. The library does not verify a check digit for this format, even where one exists. The number is masked when its official label is in the text, in the local language and script.
- It runs locally on a CPU, with no GPU and no API calls, so the text never leaves your machine.
- Every package ships every detector, so this format is covered in each of them.
- It covers 34 languages.
Related formats
The same country, or the same kind of number elsewhere.