Costa Rica DIMEX Generator (Foreigner ID / DGME)
Generate valid 11-digit and 12-digit Costa Rican DIMEX (Foreigner Identity Document) numbers for testing and development.
About Costa Rica DIMEX
The DIMEX (Documento de Identidad Migratorio para Extranjeros) is the legal identification and tax document issued by the Directorate General of Migration and Aliens (DGME) to foreign nationals residing or working in Costa Rica.
Comprising 11 or 12 numeric digits, it begins with '1' followed by regulatory category codes (such as 115 and 117 for permanent residence, 116 for temporary residence, and 155 for refugees). It serves as the primary tax ID (NIF) for foreign residents at the Ministry of Finance (Hacienda) and the Social Security Administration (CCSS).
Anatomy & Structure of DIMEX
Composition of the digits in the foreign identity card:
| Position | Field | Length | Regulatory Meaning | Example |
|---|---|---|---|---|
| Digits 1 to 3 | Migratory Category | 3 digits | DGME category code (e.g. 115, 116, 117, 118, 120, 155). | 117 |
| Remaining Digits | Registration Number | 8 or 9 digits | Sequential foreigner registry entry. | 200012345 |
Integrity & Validation Rules
Criteria specified by the DGME of Costa Rica:
- 1. Length: Must contain exactly 11 or 12 numeric digits.
- 2. Mandatory Prefix: Must begin with '1'.
- 3. Non-Repetition: Numbers consisting entirely of identical digits are invalid.
- 4. Sequential Non-Zero: Suffix cannot be all zeros.