Skip to content
UniKit

ID card validator

Validate Chinese 18-digit resident ID numbers with the GB 11643-1999 weighted mod 11-2 checksum, read the birth date, gender and region code, recognise and upgrade 15-digit legacy numbers, plus a GB 32100-2015 unified social credit code check.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

ID number

Everything runs locally: 18-digit numbers are checked against the GB 11643-1999 weighted mod 11-2 algorithm (check digit and birth date), while 15-digit legacy numbers can only have their birth date verified.

18-digit format or the 15-digit legacy format; spaces are allowed.

Result

Enter an ID number and press “Validate ID”.

Unified social credit code

18 characters, verified against GB 32100-2015.

Enter a unified social credit code and press “Validate code”.

What this tool does

  • Validate a Chinese resident ID number locally before a signup, KYC or form submission goes out, catching missing digits and wrong check characters early.
  • Read the embedded data straight out of the number: birth date, gender, province and the six-digit administrative division code, without parsing the string by hand.
  • Upgrade legacy 15-digit numbers to the 18-digit format (prepend the century and compute the check character) when normalising historical records.
  • Check a Unified Social Credit Code against GB 32100-2015, verify its 18th character and split out the registration authority, entity type, division code and organisation code.

Example

Input

440306198012120038

Output

Passed: 18 digits · birth date 1980-12-12 · male · Guangdong · region code 440306 · sequence 003 · check character 8 (expected 8)
Legacy 15-digit 440524880101001 upgrades to 440524198801010011
Unified social credit code 91350100M000100Y43 passes (authority: market regulation)

All numbers here are test data. An 18-digit number is checked with the GB 11643-1999 weighted mod 11-2 algorithm (check character and birth date); the 15-digit legacy format has no check character, so only the birth date is verified and an upgrade is offered.

Frequently asked questions

Does a passing check mean the ID really exists?

It only means the number is formally valid: correct length, legal characters, a real calendar date and a matching check character. Whether the person exists, or whether the number was cancelled or reissued, can only be confirmed through the authorities; this tool never goes online and queries no database.

What is the trailing X, and does case matter?

X stands for a check value of 10. 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, taken modulo 11 and mapped through the string 10X98765432 — a remainder of 2 yields X. Spaces are stripped and the input is upper-cased, so a lowercase x passes too.

Why can only the birth date be verified on a 15-digit number?

The legacy format simply has no check digit: it is 6 region digits + 6 birth digits (YYMMDD, always read as 19xx) + 3 sequence digits. The tool flags it as legacy and shows the upgraded 18-digit number so your data format can be unified.

Why are I, O, S, V and Z not allowed in a credit code?

GB 32100-2015 defines the charset as 0123456789ABCDEFGHJKLMNPQRTUWXY — 31 characters. I and O are removed because they are easily confused with 1 and 0, and S, V and Z to keep the arithmetic unambiguous. Input containing them is rejected as illegal characters.

Why does a number with a valid birth date and check character still fail?

Two possibilities: the birth date does not exist (30 February, or a 15-digit number whose 19xx reading falls in the future), or the check character does not match. The result panel splits the birth-date check and the check-character check into separate rows so you can see which one failed.

Keywords:id card validatorchinese id checkgb 11643checksumunified social credit code身份证验证身份证校验身份证号码解析15 位身份证统一社会信用代码校验码

Related tools