To understand how CURP codes are built, one must first understand
Hispano American naming conventions. Full names in Spanish-speaking countries (including Mexican full names) consist of three elements: •
Given name(s); • First
surname: the father's first surname; and • Second surname: the mother's first surname. The CURP code is composed of 18 characters that are assigned as follows: • The first surname's initial and first inside
vowel; • The second surname's initial (or the letter "X" if, like some foreign nationals, the person has no second surname); • The first given name's initial; • Date of birth (2 digits for year, 2 digits for month, and 2 digits for day); • A one-letter gender indicator
H for male ( in Spanish),
M for female ( in Spanish), or
X for non-binary; • A two-letter code for the
state where the person was born; for persons born abroad, the code
NE () is used; • The first surname's first inside consonant; • The second surname's first inside consonant; • The first given name's first inside consonant; and • One character ranging from 0-9 for people born before 2000 or from A-Z for people born since 2000; this is generated by the
National Population Registry to prevent identical entries. • Control digit, which checks the validity of the previous 17 digits For married women, only
maiden names are used. For example, the CURP code for a hypothetical person named Gloria Hernández García, a female, born on 27 April 1956 in the
state of Veracruz, could be
HEGG560427MVZRRL04.
Exceptions Several exceptions to the above rules exist, including:
"Ñ" If any step in the above procedure leads to the letter "
Ñ" appearing anywhere in the CURP, the "Ñ" is replaced by an "X".
Very common given names When a person has two given names and the first given name is
María, as is often the case for women in Mexico, or
José, in the case of men, the first name will be overlooked and the fourth character will be taken from the second given name's initial. This is because the names
María and
José are very common and would generate many duplicates if used to generate the code. For example, if the person were named María Fernanda Escamilla Arroyo, her CURP's first four characters would be
EAAF because
María does not count for the CURP's fourth character when a second given name is present.
Catalog of Inappropriate Words To prevent words from forming that would be deemed ('foul-sounding words', such as
profanity or
pejoratives) in the first four characters of the string, a Catalog of Inappropriate Words () lists many such possible combinations and provides replacements that usually entail changing the second letter, a vowel, into an "X". ==CURP card==