CheckIDs Try the redaction API

馃嚛馃嚢 CPR-nummer validator

Also in: Dansk

The Danish CPR number is written DDMMYY-SSSS. It encodes the date of birth, the century (through the 7th digit) and sex. Numbers issued since 2007 don't need to pass a check-digit test.

Runs entirely in your browser; nothing you type is sent anywhere.

Generate test CPR-nummer numbers

Fictional numbers with correct check digits, for testing software. They may by chance match a real person's number, so never use them to identify or impersonate anyone.

Click a number to copy it.

How a CPR-nummer is structured

How the check works

Using the published example 010203-1234:

Since 1 October 2007 new CPR numbers no longer need to pass the old modulus-11 check, so a validator can only check the date and the century rule: the 7th digit (first digit of SSSS) decides the century. 0-3 means 1900s; 4 or 9 means 2000s for years 00-36, otherwise 1900s; 5-8 means 2000s for years 00-57, otherwise 1800s. The last digit is odd for men and even for women.

A passing check only means the number is well-formed; it doesn't prove the number was issued to anyone.

Finding CPR-nummer numbers in text? The EU PII Redaction API finds and replaces national ID numbers from 21 EU/EEA countries, plus names, IBANs, emails and phones, in free text: for example before sending customer messages to an LLM. Free plan available; Python package and MCP server on GitHub.

Frequently asked questions

Why doesn't the modulus-11 check work anymore?

Denmark ran out of numbers that pass it for some birth dates, so since 2007 CPR numbers are issued without it. A validator can only check the format and the date.

Can I tell the century from a CPR number?

Yes, from the combination of the year and the 7th digit; this validator does that and shows the full birth date.

Other validators