A Chinese resident identity card (居民身份证) carries an 18-digit number used across KYC, HR and banking systems in China. This validator confirms the format and the official check digit, and decodes the embedded province, birthdate and sex, all entirely in your browser so the sensitive number never leaves your device.
How it works
The 18 characters break down as:
- Positions 1–6 — administrative-division (address) code; the first two digits indicate the province.
- Positions 7–14 — date of birth as
YYYYMMDD. - Positions 15–17 — sequence code; the 17th digit is odd for males, even for females.
- Position 18 — the ISO 7064 MOD 11,2 check digit.
To compute the check digit, multiply the first 17 digits by the weights 7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2, sum the products, and take the result modulo 11. The remainder maps through the table 1,0,X,9,8,7,6,5,4,3,2 to give the final character — which is why a valid card can end in X (representing the value 10).
Notes
The tool also checks that the embedded birthdate is a real calendar date and flags an unknown province prefix. A passing checksum proves only internal consistency, not that the card or person exists. Chinese ID numbers are sensitive personal data, so this tool performs no network calls.