Parse Chinese resident ID cards, Hong Kong/Macao/Taiwan residence permits, and foreign permanent residence ID cards.
A Chinese resident ID card is the legal personal identity document. The citizen ID number contains 17 body digits plus 1 check digit.
Digits 1-6 are the address code, indicating the administrative division of the registered residence.
Digits 7-14 are the birth date code, written as year, month and day under GB/T7408.
Digits 15-17 are the sequence code for people born in the same area on the same day; the 17th digit usually indicates gender.
Digit 18 is the check digit, calculated from the first 17 digits with ISO 7064:1983 MOD 11-2.
The number can reveal issuing area, birth date, gender and validity, and can convert older 15-digit numbers to 18 digits.