Validate CURP
validate_curpValidate an 18-character Mexican CURP and decode its birth date, sex, birth state, and century marker while checking the RENAPO check digit.
Instructions
Validate a Mexican CURP (Clave Única de Registro de Población) — the 18-character population ID issued by RENAPO — and decode everything it encodes: birth date, sex, state of birth and the century marker.
The 18th character is a base-37 modulus-10 check digit over the first 17, and this checks it. Two details it gets right that a regex does not:
The state keys are RENAPO's own. 'DF' is Ciudad de México, 'MC' is Estado de México, 'NE' means born abroad. They do not match the INEGI or ISO 3166-2:MX codes, so a lookup against those tables silently mislabels people.
The homoclave character carries the century. A digit (position 17) means born before 2000; a letter means from 2000 onwards. Without it, positions 5-10 ('99' as a year) are ambiguous.
Names that would spell one of RENAPO's inconvenient words are flagged: a real CURP carries an X in the second position instead.
Structural validity is not registration. Only RENAPO can confirm a CURP belongs to a real person, and this server never asks it.
Args:
value (string): the CURP. Spaces, dashes and lower case are normalised away.
response_format ('markdown' | 'json'): output format (default 'markdown').
Returns: { input, normalized, valid, parts{...}, birth_date, sex, sex_label, state_key, state_name, century_marker, expected_check_digit, errors[{code, message}], findings[] }.
Example: "Decode BOXW310820HNERXN09" -> validate_curp(value="BOXW310820HNERXN09").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | The CURP to validate, e.g. 'BOXW310820HNERXN09'. | |
| response_format | No | Output format: 'markdown' for a human-readable summary (default) or 'json' for the full structured payload. | markdown |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sex | Yes | ||
| input | Yes | ||
| parts | Yes | ||
| valid | Yes | ||
| errors | Yes | ||
| findings | Yes | ||
| sex_label | Yes | ||
| state_key | Yes | ||
| birth_date | Yes | ||
| normalized | Yes | ||
| state_name | Yes | ||
| century_marker | Yes | ||
| expected_check_digit | Yes |