Peru CE Validator
Online Peru CE validator. Verify format and check digits. For testing.
How is the CE validated?
The Carné de Extranjería (CE) is the official identity card for foreigners holding resident visas in Peru, managed by Migraciones.
This tool generates and validates Peruvian CE document numbers, verifying length and character structures for form testing.
Anatomy & Structure of Alien Registration Card (CE)
The Peruvian foreign resident ID card consists of 9 characters:
| Position | Field | Length | Meaning & Rule | Example |
|---|---|---|---|---|
| 1 | Prefix Letter | 1 character | Letter C (Standard Resident) or E (Diplomatic / Special) | C |
| 2 to 8 | Registration Serial | 7 digits | Unique migration registration serial number | 1234567 |
| 9 | Check Digit | 1 digit | Modulo 11 checksum with decreasing weights [8, 7, 6, 5, 4, 3, 2] | 8 |
Alien Registration Card Validation Algorithm (Migraciones Modulo 11)
Migraciones validates the terminal check digit via weighted Modulo 11:
Remainder = (Σ (d[i] × [8, 7, 6, 5, 4, 3, 2][i])) % 11; DV = 11 - Remainder; if DV >= 10, DV = 0
- 1. Ensure the leading character is letter C or E.
- 2. Multiply the 7 central digits by weights [8, 7, 6, 5, 4, 3, 2].
- 3. Compute sum of products and remainder modulo 11.
- 4. DV = 11 - remainder; if DV >= 10, DV = 0.
- 5. Conforms if 9th character matches DV.