China Resident ID Decoder & Validator

Decode an 18-character Chinese ID and verify its ISO 7064 check character.

Free China Resident Identity Card decoder and validator. Read the province, date of birth and gender from an 18-character ID and verify the ISO 7064 MOD 11-2 check character. Privacy-first — runs entirely in your browser, nothing is sent anywhere. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

How does the check-character validation work?

The 18-digit ID uses the ISO 7064 MOD 11-2 algorithm. The first 17 digits are multiplied by the weights 7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2, summed mod 11, and mapped to a check character (0-9 or X). The card is valid only if that matches the 18th character.

The Chinese Resident Identity Card number (居民身份证, standard GB 11643) is an 18-character code that encodes where and when a person was born plus a check digit. This decoder reads the province, date of birth and gender from the number and verifies its check character, so you can validate test data or catch a mistyped ID. It never queries any government database.

How it works

The 18 characters break down as follows:

PositionLengthMeaning
1–22Province / autonomous region / direct-controlled municipality
3–42Prefecture-level city or division
5–62County or district
7–148Date of birth: YYYYMMDD
15–173Sequence number within the county; 17th digit encodes gender
181Check character: 0–9 or X

The province code maps to one of 34 top-level administrative divisions. For example, 11 = Beijing, 31 = Shanghai, 44 = Guangdong, 51 = Sichuan.

The ISO 7064 MOD 11-2 check

The check character uses the ISO 7064 MOD 11-2 algorithm: the first 17 digits are multiplied by the fixed weights 7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2, the products are summed, and the sum is taken modulo 11. The remainder maps to a check character as follows:

Remainder012345678910
Check char10X98765432

When the computed check value is 10, it is written as the letter X because a single digit position cannot hold two characters. The ID is valid only when the 18th character matches the computed check character exactly.

Worked example

Consider a number starting with 110101 19900307 003 X:

  • Province code 11 → Beijing
  • Date of birth 19900307 → 7 March 1990
  • Sequence digit 3 (odd) → male
  • Check character X → computed remainder was 2, which maps to X — valid

A single-digit transcription error in positions 7–17 virtually always changes the check value, making the algorithm an effective single-error detector.

What this tool does and does not do

The decoder checks the number’s internal consistency only. It confirms the structure is correct (18 characters), the date is a real date, and the check character is mathematically valid. It does not confirm that the number belongs to a real registered person or that the personal details you supply match any government record. For software developers it is ideal for validating test data and catching user input errors, while keeping all data strictly in the browser — no number you enter is ever transmitted anywhere.