DevTools Logo

Denmark CPR Number Generator

Denmark CPR Number Generator

Generate 10-digit Danish CPR numbers with a real birth date and century digit — synthetic test data only

Runs in your browser

For Development & Testing Purposes Only - Synthetic Mock Data

Settings

1 value

Generates one value with a valid checksum. Press ⌘/Ctrl+Enter for a fresh one.

Generated value

No value yet

Set options, then press Generate.

Generated values are valid in shape but randomized (Test Data).

Legal Disclaimer: Generated data is for software testing and validation purposes only (e.g. verifying input masks, form validation, or database seeding). It is randomly generated and not taken from any real record, but a random value can coincidentally match a real, issued number, so never use it in real applications, payments, KYC or official forms. Using it to impersonate real people or for any fraudulent activity is illegal. DevTools accepts no liability for how generated data is used.

    Examples

    Generate a CPR number

    Input
    DK CPR · Generate
    Output
    211062-5629

    A real date, a seventh digit that fixes the century and a final digit that fits the parity rule.

    Reject day 51

    Input
    511062-5629
    Output
    Invalid — 511062 is not a real DDMMYY date

    The date check runs before anything else and names the century it derived.

    Reject a future birth year

    Input
    211030-9000
    Output
    Invalid — the 7th digit puts the birth year at 2030

    The century table can place a year ahead of today, and the validator refuses it.

    About this tool

    The Denmark CPR Number Generator produces one 10-digit CPR number in DDMMYY-SSSS form, the personal identifier issued through Det Centrale Personregister. The first six digits are the birth date, the next three are serial, and the tenth is a check digit.

    The seventh digit, together with the two-digit year, fixes the century using the CPR-kontoret table, and the last digit is even for women and odd for men. Denmark dropped the modulus-11 check in 2007, so validation checks the date and the century rather than a checksum; generated values still pass the old modulus-11 test so they stay compatible with systems that never removed it.

    These are synthetic values for QA and development: never use them on real applications, KYC checks, tax filings, or identity documents, and DevTools accepts no liability for how generated data is used. A random value can coincidentally match a real CPR number. Everything runs locally in your browser.

    What this tool does not do

    • There is no live checksum, so a mistyped digit can still form a plausible number.
    • Generated birth years stay between 1940 and 2005, so other cohorts need manual samples.
    • Validation cannot confirm assignment or that the number belongs to a person.
    • A generated value can coincide with a real CPR number.

    How to use this tool

    1. Open the CPR generator

      The tool is pinned to the 10-digit CPR layout, so there is no option to choose.

    2. Generate a value

      Click Generate to create one number with a real date, a century that matches the seventh digit and a gender marker.

    3. Copy or validate

      Copy the number to a payroll fixture or download it as a .txt file, or switch to Validate to check a pasted value.

    Use cases

    Payroll fixtures

    Seed Danish employee records with a CPR number that passes the date and century rules.

    Gender-field mapping

    Test forms that derive gender from the last digit instead of asking for it.

    Century reasoning

    Confirm that your code uses the seventh digit rather than assuming 1900 or 2000.

    CPR layout and checks

    PartRule
    DDMMYYBirth date, checked against a real calendar date
    Seventh digitWith the year, fixes the century (CPR-kontoret table)
    Last digitEven = female, odd = male
    Modulus 11Dropped in 2007; generated values still pass it
    ValidationChecks the date and the century, not a checksum

    A day of 51 fails because it is not a real DDMMYY date for the century the seventh digit implies.

    Common mistakes

    Mistake:Expecting a modulus-11 rejection

    Fix:Denmark dropped the checksum in 2007, so a valid CPR number can fail mod 11.

    Mistake:Reading the seventh digit as serial only

    Fix:It also fixes the century together with the two-digit year.

    Mistake:Treating a CPR number as a tax ID

    Fix:The CPR number identifies a person; Danish tax and VAT identifiers are separate.

    Frequently asked questions

    Are these real Danish CPR numbers?

    No. They are synthetic values for QA and development, never for real applications, KYC checks, tax filings, or identity documents, and DevTools accepts no liability for how they are used.

    Does a CPR number still use modulus 11?

    No. Denmark dropped the modulus-11 check in 2007, so validation checks the birth date and the century instead.

    Why do generated values still pass modulus 11?

    They are built to satisfy the old test so they stay compatible with systems that never removed it.

    How does the seventh digit work?

    Together with the two-digit year it fixes the century using the CPR-kontoret table, which the validator applies to every value.

    Which digit marks gender?

    The tenth and last digit is even for women and odd for men.

    References & standards