# What are the rules for generating ID numbers

### What are the coding rules of the ID card

ID card number rules: the first 1, 2 digits indicate: the code of the province; 3, 4 digits indicate: the code of the city; 5, 6 digits indicate: the code of the district and county; 7-14 digits indicate: the year, month and day of birth; 15, 16 digits indicate: the location of the police station code; 17 digits indicate gender: odd number indicates male, even number indicates female; 18 digits are the checking code: some say it is the personal information code, which is usually generated randomly with the computer to check the correctness of the ID card. The 17th digit indicates the gender: odd number indicates male, even number indicates female; the 18th digit is the checking code: some say it is the personal information code, which is usually generated randomly with the computer and used to check the correctness of the ID card. The check digit can be a number from 0-9, and is sometimes indicated by _.

1, ID card coding rules are as follows: according to the [People’s Republic of China national standard GB11643-1999] in the provisions of the citizenship number, the citizenship number is a combination of characteristics of the code, consisting of seventeen digits of the body of the code and one digit of the check code.

The sequential code (the fifteenth to seventeenth digits of the ID card) is the code assigned to the police station under the jurisdiction of the county and district governments, and each police station is assigned 10 consecutive numbers, for example, “000-009” or “060-069”, in which Odd numbers are assigned to males and even numbers are assigned to females, and if there are more than two persons in the same year, month, and day, the second, third, fourth, and fifth assignments are postponed. For example, 005 is a male, and there are at least two males born in the same year, month and day with him, and their last four digits are 001* and 003*. Allocation of sequential code in the “999, 998, 997, 996” four sequential numbers for men and women over 100 years of age, respectively, a specific number.

The check digit (the last digit of the ID card) is a check digit calculated according to the previous seventeen digit code, in accordance with ISO7064:1983.MOD11-2 check digit.

2, from October 1, 1999, the national implementation of the national identity card number system, the resident identity card number from the original 15 to 18 bits. The first 6 bits for the address code; the seventh to 14 bits for the date of birth code, this code from 6 digits to 8 digits, of which the year with a 4-digit representation; 15th to 17th for the sequence code, canceled the order of the code for the centenarian use of a specific number; eighteenth for the check code, mainly for the verification of the computer to enter the first 17 digits of the citizen identity card number whether the correct number of the value of the range of 0 to 10, and when the value equals to 10, use the Romanization code, the value is 0 to 10, the value is 0 to 10, the value is 0 to 10, the value is 0 to 10, the value is 0 to 10. When the value is equal to 10, it is indicated by the Roman numeral X.

Legal Basis

Civil Code of the People’s Republic of China

Article 8 Civil subjects engaging in civil activities shall not violate the law, and shall not contravene public order and morality.

Law of the People’s Republic of China on Resident’s Identity Card

Article 3 Items registered on a resident’s identity card include: name, gender, ethnicity, date of birth, address of the place where the person’s permanent household registration is located, citizen’s identity number, the person’s own photograph, fingerprint information, the validity period of the document and the issuing authority.

Citizen identification number is a unique, lifelong identity code for each citizen, compiled by the public security organs in accordance with the national standard for citizen identification numbers.

Citizens applying for the issuance, renewal or replacement of a resident’s identity card shall have their fingerprint information registered.

### How the ID card number is arranged

The rules for arranging the ID card number are as follows:

(1) The first 1 or 2 digits indicate: the code of the province where it is located.

(2) The 3rd and 4th digits indicate: the code of the city.

(3) The 5th and 6th digits indicate: the code of the district where you are located.

(4) The 7th to 14th digits indicate: year, month and day of birth.

(5) The 15th and 16th digits indicate: the code of the local police station.

(6) The 17th digit indicates gender: odd number indicates male, even number indicates female.

(7) The 18th digit is the check digit: some say it is the personal information code, which is usually generated randomly with the computer.

The correct and official term for a resident’s identity card number is “citizenship number”. The People’s Republic of China (PRC) Resident Identity Card (ID card) is a national legal document that proves a citizen’s personal identity.

18-bit ID card standard in the State Bureau of Quality and Technical Supervision in July 1, 1999 implementation of the GB11643-1999 “Citizen Identification Number” in the clear provisions.

GB11643-1999 “Citizen Identity Number” for GB11643-1989 “Social Security Number” of the revised version, which pointed out that the original standard name “Social Security Number” renamed “Citizen Identity Number”, and GB11643-1999 “Citizen Identity Number” for GB11643-1989 “Social Security Number”. In addition, GB11643-1999 Citizen Identity Number replaces GB11643-1989 from the date of implementation.

### What are the rules for the preparation of identity card numbers

Legal analysis: the provisions of the citizenship number, the citizenship number is a combination of characteristics of the code, consisting of seventeen digits of the body code and a digital check code. Arranged in order from left to right as follows: six-digit address code, eight-digit date of birth code, three-digit sequence code and one-digit check code. Odd numbers of the sequential code are assigned to males and even numbers to females. The check digit is a test code calculated from the previous seventeen digit code in accordance with ISO 7064:1983.MOD11-2 check digit.

Legal basis: “the Standing Committee of the National People’s Congress on amending the” Resident Identity Card Law of the People’s Republic of China “6,” Article 22 was changed to Article 23, the second paragraph was amended to read:” in accordance with the “Regulations of the People’s Republic of China on Resident Identity Cards” to receive a resident identity card, since January 1, 2013, ceased to be used. Resident identity cards received in accordance with this Law before January 1, 2012, shall remain valid for the duration of their validity.” One paragraph shall be added as the third paragraph: “After the State decides to issue a new generation of resident’s identity cards, the date of cessation of use of the original resident’s identity cards shall be decided by the State Council.” This Decision shall come into force on January 1, 2012. The Resident Identity Card Law of the People’s Republic of China shall be amended accordingly in accordance with this Decision and republished.

### The law of identity card number

1, China’s residents identity card number has 18 bits, by the combination of 17 body code and 1 check code. From left to right are: digital address code (6-bit ID card belongs to the number), residence date of birth (8-bit), sequential code (3-bit), check code (unified formula calculation: 1-bit).

2. The penultimate digit is even for girls and odd for boys. The birth date code (seventh to fourteenth digits of the ID card) indicates the year, month and day of the birth of the coded object, in which the year is represented by four digits, and no separator is used between the year, month and day. For example, May 11, 1981 is expressed as 19810511.

3, the birth date code (ID card seventh to fourteenth) indicates the year, month and day of the birth of the code object, where the year is expressed in four digits, the year, month and day without separator between.

4, the law of the identity card number 1. The structure of the number of citizenship identity number is characterized by a combination of codes, by seventeen digits of the body code and a check code. Arranged in order from left to right as follows: six-digit address code, eight-digit date of birth code, three-digit sequential code and a digital check code.

### ID card composition law

1. ID card number composition structure

China’s residents ID card number has 18 bits, by 17 body code and 1 check code combination. From left to right are: digital address code (6 ID card belongs to the number), residence date of birth (8), sequential code (3), check code (unified formula: 1).

This code is compiled in accordance with GB/T2260, is the administrative code of the county in which the resident permanent residence is located (city, flag, district).

3. Digital date of birth (7th to 14th digits)

The code is implemented according to GB/T7408, which indicates the date of birth of the subject of the resident’s identity card. The code consists of consecutive digits with no separator in between.

4. Digital Sequence Code (15th to 17th digits)

Odd numbers of this sequence code are assigned to males and even numbers to females. It is a sequence number compiled sequentially for people born in the same year, month and day within the area (county, city, flag and district) identified by the same numerical address code.

5. Digital Check Digit (Last Digit)

The check digit of the last digit I is calculated by the state in accordance with the unified formula for numbering units. Since this number is only 1 digit (otherwise the ID card becomes 19 digits), the tail number is obtained when the tail number is 0-9. However, if the tail number is 10, it is replaced with X to comply with the Chinese national standard digits.

### The arrangement law of ID card

According to the provisions of the national standard GB11643-1999 about the citizen’s identity number, the citizen’s identity number is a combination of the characteristics of the code, consisting of seventeen digits of the body code and one digit of the check code. Arranged in order from left to right as follows: six-digit address code, eight-digit date of birth code, three-digit sequential code and a digital check code.

The citizenship number is coded for citizens with the nationality of the People’s Republic of China.

1, the address code (the first six digits of the ID card number) indicates the administrative code of the county (city, town, district) in which the coding object has a permanent residence. According to the provisions of GB/T2260.　　Mainland residents identity card number in the address code of the digital coding rules are: the first two that the province (autonomous regions, municipalities directly under the Central Government, special administrative regions).　　The third and fourth digits indicate the city (summary code for prefectural cities, autonomous regions, leagues and municipal districts and counties belonging to state municipalities directly under the central government). Among them, 01-20, 51-70 indicate provincial municipalities; 21-50 indicate regions (autonomous regions, leagues).　　The fifth and sixth digits indicate counties (city districts, county-level cities, flags). 01-18 indicates city districts or districts (autonomous prefectures, leagues) under the jurisdiction of county-level cities; 21-80 indicates counties (flags); 81-99 indicates county-level cities under the jurisdiction of the province.

2, the date of birth code (ID card number seventh to fourteenth) indicates that the code object was born in the year, month, day, where the year is expressed in four digits, the year, month, day without separator between. For example: May 11, 1981 with 19810511 said.

3, the order of the code (ID number fifteenth to seventeenth) address code identified by the regional scope of the same year, month, day of birth of the person organized by the order of the number. The seventeenth digit is assigned to males in odd numbers and females in even numbers.

4, check digit as the check digit of the tail number, is calculated by the numbering unit according to a unified formula, if someone’s tail number is 0-9, there will be no X, but if the tail number is 10, then you have to replace it with an X, because if you use the 10 as the tail number, then the person’s ID card becomes a 19-bit number, which violates the national standard, and China’s computer application system also does not recognize 19-digit ID numbers. Ⅹ is the Roman numeral for 10, and replacing 10 with X ensures that a citizen’s ID card meets national standards.

Check digit calculation standard:

(1), multiply each of the 17 digits of the previous ID card number by a different coefficient. From the first to the seventeenth coefficient are: 7-9-10-5-8-4-2-1-6 -3-7-9-10-5-8-4-2.

(2), multiply the 17-digit numbers and the result of multiplying the coefficients together.

(3), Divide the sum by 11 and see what the remainder is.

(4) The remainder can only be 0-1-2-3-4-5-6-7-8 -9-10 These 11 numbers. Their respective numbers corresponding to the last ID are 1-0-X-9-8-7-6-5-4

(5), through the above that if the remainder is 3, will appear in the 18th digit of the ID card is 9. If the corresponding number is 2, the last ID card number is the Roman numeral x. X actually means 10, only with the Roman numeral instead of just, if you do not use the Roman numeral instead, then the ID number is Roman numeral x. If you don’t use Roman numerals instead, then the ID number will become 19 digits.