CURP generator and validator

CURP generator for tests: samples with a valid check digit and the algorithm worked out.

loading CURP generator and validator
About this tool

CURP: what it is and how to test it

The CURP (Clave Única de Registro de Población) is the 18-character identifier of every resident of Mexico, issued by RENAPO. Unlike most documents it is built from the person: initials of the name, birth date, sex and state of birth, so a test CURP must also have a plausible date and a real state code.

For tests only. These numbers have a correct format and check digit but belong to no real person or account. Never use them to deceive, to open accounts or to bypass a check. The numbers on this page come from the same generator as the tool, with a fixed seed so that the examples do not change; the tool creates new ones at every click.

Structure of the number

18 characters: 4 letters of the name and surnames, the birth date as YYMMDD, the sex (H, M or X), the 2-letter code of the state (33 official codes, including NE for born abroad), 3 internal consonants, a homoclave (a digit until 1999, a letter from 2000) and a check digit.

The check digit, step by step

The check digit uses module 10 over the first 17 characters. Each character takes the position it has in the alphabet 0123456789ABCDEFGHIJKLMN&OPQRSTUVWXYZ (digits 0 to 9, A to N = 10 to 23, the Ñ position written &, O to Z = 25 to 36), is multiplied by a weight from 18 down to 2, and the products are summed. The check digit is 10 minus the remainder of the sum by 10, taken mod 10.

Worked example with GOHZ901124XCMKGD09:

PositionCharacterValueWeightProduct
1G1618288
2O2517425
3H1716272
4Z3615540
59914126
600130
7111212
8111111
9221020
1044936
11X348272
12C12784
13M226132
14K205100
15G16464
16D13339
170020

Sum = 2421; 2421 mod 10 = 1; 10 - 1 = 9, taken mod 10: the check digit is 9.

Valid examples

Five numbers generated by the tool with a fixed seed, each one accepted by its validator:

Without maskValidator
GOHZ901124XCMKGD09valid
GEEH830517HJCTZB58valid
AAOQ931218XPLZDG46valid
OAKQ480728MBSGYS78valid
QOZR960628HQRGZM16valid

How the validator answers

The same first example, one with a changed ending and one truncated, checked by the validator:

ValueResultReason
GOHZ901124XCMKGD09valid-
GOHZ901124XCMKGD00invalidthe check digit should be 9
GOHZ901124XCMKGDinvalidneeds 18 characters

Common mistakes

  • Forms often reject a CURP whose first four letters spell an offensive word: RENAPO replaces the second letter with X in those cases (BUEI becomes BXEI), and a generator must avoid them.
  • Reading the year as 19YY always breaks people born from 2000: the 17th character tells the century, a digit for 1900 to 1999 and a letter for 2000 on.

Frequently asked questions

How do I validate a CURP?

Check the length (18), the structure (letters, date, sex, state, consonants), that the date exists and the state is one of the 33 codes, then the check digit with the rule above. The validator on this page does all of it.

Does a valid CURP belong to a real person?

Not necessarily: the format and the check digit can be right for a number nobody has. Only RENAPO's own consultation says whether a CURP is registered.

Can I use a CURP number generated here in a real system?

No. A number such as GOHZ901124XCMKGD09 has a correct format and check, but nobody was issued it, and it may coincide with a real holder by chance. Use it in test environments, demos and automated tests that never leave your control.

Report a problem