James's 社工库

No information is logged or sent; all data is processed locally.

区:

市:

镇:

出生日期:

顺序码:

性别:

校验码:

Region:

City:

Sub-City:

Date of Birth:

Order Code (Admin Use):

Gender:

Checksum:



A (mainland) Chinese ID card, is formally known as a 'Resident Identity Card' (居民身份证), issued as mandatory to all Chinese citizens over 16 years of age. It is a uniform legal document used to certify the identity of the holder.
China's first-generation ID card typically bore a 15-digit ID number, issued by local authorities. They were easy to counterfeit and lacked a national tracking number to assist with fraud detection. After 2013, the second-generation ID card is reported to have all but replaced its predecessor.
Verify the integrity of a Chinese National ID (身份证) number and extract various pieces of information about the card holder from the ID number.
This was toy project to teach myself the structure of Chinese ID card numbers and how they work. The scripts in this repo perform the following functions:
Verify the integrity of a given Chinese ID number (using a MOD 11-2 checksum)
Extract information about the card holder (i.e. DoB, gender and geographic location where card was issued)
The extract information in translated into English and Pinyin
The scripts contained in this repo may also be useful for anyone with a similar interest. They may also be useful for anyone handling and processing Chinese ID numbers and could be integrated into online integrity and counter-fraud processes.