I.D. Numbers, complete deciphering.
Structure of ID number
The number of the Chinese resident identification card is made up of 18 figures (the last one can be X), each of which has a specific meaning:
-
1-6:
Address code, which indicates the administrative code of the domicile.
-
Number 7-14:
Date of birth, in YYYMMDD
-
15-17:
Order code, serial number of persons born on the same day in the same area, odd number for men and even number for women
-
Number 18:
Validation code, calculated by the top 17, for 0-9 or X (X for 10)
Method of calculating the calibration
Identification card identification is valid for ISO 7064: 1983. MOD11-2 standard calculations. Specific steps:
-
Multiply the top 17 figures by their corresponding weights (7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2)
- Sum of 17 multipliers
- Divide the balance by 11
- Check based on the balance check.
Address code rule
The address code (first 6) follows the criteria of the Administrative Division Code of the People ' s Republic of China (GB/T2260):
- 1 - 2: Provincial administrative districts (11 = Beijing, 31 = Shanghai, 44 = Guangdong...)
- 3-4: District (municipal/territorial/autonomous)
- 5-6: Districts (county/municipal districts/county municipalities)
Date of birth
The number 7-14 is 8 date of birth and the format is the number of months (4) and months (2). For example: 1990-0101 for 1 January 1990. The date of birth must be legal and not earlier than 1900 or later than the current date.
Order code and gender judgement
The number of the 15-17 is the order of birth on the same day in the same area. The 17th (or the last) of these is used to determine sex: the odd number (1, 3, 5, 7, 9) represents the man and the even number (0, 2, 4, 6, 8) represents the woman.
Common authentication error cause
- 18 bits or more
- The top 17 characters contain non-digital characters (with 18th place x)
- Invalid date of birth (e.g., month exceeding 12 or days)
- Date of birth is the future.
- The verification code does not match (most common input error)
Statement of privacy protection
This tool is fully running at the frontend of the browser, using the pure JavaScript Achieving all the logic of resolution. The ID number you entered does not request to leave your device via any network. All data disappears immediately after the page closes and is not stored in any database or log.
Use scene for tools
- Validate whether the format of the entered ID number is valid (develop test scene)
- Quickly extract birth date, age information from ID number
- Learning to know the code code for ID numbers
- Test front-end table validation logic