Unique Population Registry Code

The Clave Única de Registro de Población (translated into English as Unique Population Registry Code or else as Personal ID Code Number) (abbreviated CURP) is a unique identity code for both citizens and residents of Mexico. Each CURP code is a unique alphanumeric 18-character string intended to prevent duplicate entries.
How CURP codes are built.
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:
The CURP code is composed of 18 characters that are assigned as follows:
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 "palabras altisonantes" ("foul-sounding words", such as profanity or pejoratives) in the first four characters of the string, a Catalog of Inappropriate Words ("Catálogo de Palabras Inconvenientes") lists many such possible combinations and provides replacements that usually entail changing the second letter, a vowel, into an "X".
CURP Card.
Issuance.
Initially, a CURP card ("cédula") was obtainable at CURP government offices, and also at the Civil Registry, ISSSTE, IMSS, and other government services; the document was printed on green paper at the time. Valid copies of existing CURPs can now be printed on plain paper by visiting an official website.
While an existing CURP can be looked up using one of the .gob.mx sites listed in the external links, it is not possible to get a CURP issued online. There are advertising sites that will generate a "CURP" look alike. Those sites do not enter a new CURP in the national database, they simply generate a number. Two of those advertising sites are listed below. A new CURP can only be applied for in person at the appropriate government office.
Description.
The CURP card is 5.4 cm wide and 8.6 cm long, fits in a wallet and may be laminated for preservation. The front of the card gives the CURP 18-character string, given names and surnames, plus the date of registration and a folio number. The back contains information referencing the document used as proof to originally assign the CURP code (if it was a birth certificate, folio number and issuing "municipio" are included), and a barcode.
Use.
On 23 October 1996, the Presidential Agreement for the Adoption and Use of the Population Registry Unique Code by the Federal Government ("Acuerdo Presidencial para la adopción y uso por la Administración Pública Federal de la Clave Única de Registro de Población") was published in the "Official Gazette of the Federation".
The Agreement provides assigning a CURP number to everyone living in Mexico and to Mexicans living abroad.
Currently, the CURP is essential for tax filings, to keep records of companies, schools, membership in government-run health services, passport applications, and other government services.
CURP number is now used in all Civil Registry individual records (birth and death certificates) and certified copies thereof.
Although primarily intended to substitute for a series of registration numbers (IMSS, RFC, IFE), CURP has failed to replace any of these, which continue to use their own code-generation protocols. Nevertheless, INE voting card now contains both the IFE code and the CURP code.
CRIP.
Outside Mexico City, the "Clave de Registro e Identidad Personal" (Personal Registration and Identification Code) (CRIP) is used, in addition to CURP.
CUI.
It has been proposed the creation of a Unique Identity Code (CUI) that could possibly replace the CURP, to unify the system throughout Mexico.