The Chinese Resident Identity Card number (居民身份证, standard GB 11643) is an 18-character code that encodes where and when a person was born plus a check digit. This decoder reads the province, date of birth and gender from the number and verifies its check character, so you can validate test data or catch a mistyped ID. It never queries any government database.
How it works
The 18 characters break down as follows:
| Position | Meaning |
|---|---|
| 1-6 | Address code: province, prefecture, county |
| 7-14 | Date of birth (YYYYMMDD) |
| 15-17 | Sequence; 17th digit = gender (odd male, even female) |
| 18 | Check character (0-9 or X) |
The check character uses the ISO 7064 MOD 11-2 algorithm: the first 17 digits are multiplied by the weights 7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2, summed modulo 11, and mapped to a check value where 10 is written as X. The ID is valid only if that matches the 18th character.
Example
A number beginning 110101 decodes the province as Beijing. If digits 7-14 are 19900307, the date of birth is 7 March 1990, and a 17th digit of 3 (odd) marks the holder male. The decoder then recomputes the MOD 11-2 check character and confirms it equals the 18th character.
It is privacy-first: nothing leaves your browser. The validator checks the number’s internal consistency only and never queries any government database.