ID card birth date extractor
Parse an 18-digit Chinese resident ID number into birth date, gender and area code: the check digit is verified with ISO 7064:1983 MOD 11-2 (weights 7 9 10 5 8 4 2 1 6 3 7 9 10 5 8 4 2), and a wrong check digit raises invalid-idcard instead of returning a plausible birthday. The lunar date, Chinese zodiac and Western sign are included.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Result
The birth date is only shown after the check digit passes.
Enter an ID number to parse
Birth year: 0 · Birth month: 0 · Birth day: 0 · Gender (1 male, 0 female): 0 · Age band (per decade): 0
What this tool does
- Extract the birth date and gender before data entry.
- Verify the check digit of a copied number.
- Get the lunar date and zodiac of the birthday.
Example
Input
110101194912310024
Output
身份证号 / ID number: 110101194912310024 出生日期 / Birth date: 1949-12-31(周六) 性别 / Gender: 女(顺序码 002,末位偶数为女) 校验位 / Check digit: 4(ISO 7064 MOD 11-2 校验通过) 地址码 / Area code: 110101 农历 / Lunar: 一九四九年冬月十二(己丑年 · 牛) 生肖 / Zodiac: 牛 星座 / Constellation: 摩羯座(12/22–01/19)
Check-digit example: 110101194912310024 (the national-standard sample number) ends in X, which is what ISO 7064 MOD 11-2 produces; the lunar date and zodiac use the 1900-2100 table.
Frequently asked questions
How is the check digit computed?
Per ISO 7064:1983 MOD 11-2: the first 17 digits are multiplied by 7 9 10 5 8 4 2 1 6 3 7 9 10 5 8 4 2, summed, and looked up modulo 11 in 1 0 X 9 8 7 6 5 4 3 2. A mismatch raises invalid-idcard.
Why does 110105194912310021 fail?
Its check digit should be X, not 1. The tool prefers an error over returning a plausible-looking birthday for an invalid number.
Are 15-digit numbers supported?
No. The 15-digit format uses different rules, so this tool accepts 18-digit numbers only and reports invalid-idcard otherwise.
How is gender determined?
The 17th digit (last of the sequence code) is odd for male and even for female; the area code and birth date are shown as well.
Keywords:id cardISO 7064idcard2date