Skip to main content
Skip to main content

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.

Waiting for generation...

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:

PositionFieldLengthRegulatory MeaningExample
Digits 1 to 3Migratory Category3 digitsDGME category code (e.g. 115, 116, 117, 118, 120, 155).117
Remaining DigitsRegistration Number8 or 9 digitsSequential foreigner registry entry.200012345

Integrity & Validation Rules

Criteria specified by the DGME of Costa Rica:

Total Length = 11 or 12 decimal digits
  1. 1. Length: Must contain exactly 11 or 12 numeric digits.
  2. 2. Mandatory Prefix: Must begin with '1'.
  3. 3. Non-Repetition: Numbers consisting entirely of identical digits are invalid.
  4. 4. Sequential Non-Zero: Suffix cannot be all zeros.

Frequently Asked Questions (FAQ)