Skip to main content

Chinese Resident ID Validator

Validate Chinese Resident Identity Card numbers in real time under GB 11643-1999 and ISO 7064 MOD 11-2.

How Chinese Resident ID Validation Works

Validation checks all 18 characters: administrative region code, valid birth date in the calendar, and the ISO 7064 MOD 11-2 weighted checksum formula.

It verifies whether the final check character matches the official modulo 11 algorithm defined by China's Ministry of Public Security.

Anatomy & Structure of the Resident ID (居民身份号码)

The Chinese Resident Identity Number consists of 18 characters structured in 4 parts:

PositionFieldLengthMeaning & RuleExample
1 to 6Administrative Code6 digitsAdministrative division code (province/city/district) per GB/T 2260110101
7 to 14Date of Birth8 digitsDate of birth in YYYYMMDD format19900307
15 to 17Sequential Code3 digitsDifferentiates individuals of the same area/date; digit 17 odd = male, even = female001
18Check Character1 characterCalculated via ISO 7064 MOD 11-2 (values 0–9 or X representing 10)7

Official Algorithm (ISO 7064 MOD 11-2 — GB 11643-1999)

Resident ID integrity is verified using the ISO 7064 MOD 11-2 algorithm:

S = Σ d[i] × W[i] (i=1..17); R = S mod 11; Check = map[R]
  1. 1. Multiply the first 17 digits by their positional weights: W = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2].
  2. 2. Sum all products to get total S.
  3. 3. Compute remainder R = S mod 11.
  4. 4. Map R to the check character: {0→1, 1→0, 2→X, 3→9, 4→8, 5→7, 6→6, 7→5, 8→4, 9→3, 10→2}.
  5. 5. The ID is valid if the 18th character matches the mapped character.

Validation Frequently Asked Questions