Skip to main content

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:

PositionFieldLengthMeaning & RuleExample
1Prefix Letter1 characterLetter C (Standard Resident) or E (Diplomatic / Special)C
2 to 8Registration Serial7 digitsUnique migration registration serial number1234567
9Check Digit1 digitModulo 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. 1. Ensure the leading character is letter C or E.
  2. 2. Multiply the 7 central digits by weights [8, 7, 6, 5, 4, 3, 2].
  3. 3. Compute sum of products and remainder modulo 11.
  4. 4. DV = 11 - remainder; if DV >= 10, DV = 0.
  5. 5. Conforms if 9th character matches DV.

Frequently Asked Questions about Validation