esc
ID checkers

身份证号码校验:
China resident ID check and decoder

Type an 18-digit 身份证号码 to check its 校验码 and see the 归属地, birth date and sex it encodes. Type 17 digits to work out the last one.

More tools for China Other countries

How to use 身份证号码校验

  1. 01Type the number18 characters, X at the end is fine.
  2. 02See the check校验码 matches or not.
  3. 03Read the parts归属地, 出生日期, 性别.
Front and back of an ID card on one sheet of paper

11010519491231002X: 北京 朝阳区, 1949, female.

The national standard GB 11643-1999 sets the layout of the 公民身份号码 and its check code. The tool applies the standard’s MOD 11-2 formula, names the county from the Ministry of Civil Affairs code lists since 1980, and also reads residence permits for Hong Kong, Macao and Taiwan residents and the 2023 foreigner’s permanent residence ID.

身份证号码校验 based on the national standard itself: the tool checks the 18th character with the GB 11643-1999 MOD 11-2 formula, and reads the region code, birth date and sex. It is a format check, not a 真假 lookup, and runs entirely in your browser.

The structure of a 公民身份号码

The standard’s own example, 11010519491231002X, is a woman born on 31 December 1949 whose number was issued in 北京市朝阳区 (110105). Her sequence code 002 is even, which marks a woman.

  • Digits 1–6, 地址码: the county-level administrative code (GB/T 2260) of the place where the number was first issued.
  • Digits 7–14, 出生日期码: year, month and day of birth, YYYYMMDD.
  • Digits 15–17, 顺序码: a sequence for people born on the same day in the same county; odd for men, even for women.
  • Digit 18, 校验码: the check code, 0–9 or X.

How the 校验码 is calculated

  1. Multiply the first 17 digits by 7 9 10 5 8 4 2 1 6 3 7 9 10 5 8 4 2.
  2. Add the products. For 11010519491231002 the total is 167.
  3. Divide by 11 and keep the remainder: 167 = 15 × 11 + 2.
  4. Remainders 0 to 10 give the check codes 1 0 X 9 8 7 6 5 4 3 2, so 2 gives X.

Other cards that use the same number

  • 港澳台居民居住证: residence permits for Hong Kong, Macao and Taiwan residents use the address codes 810000, 820000 and 830000.
  • 外国人永久居留身份证 (2023 version): the number starts with 9, then the code of the province where it was applied for, a 3-digit country code, the birth date, a sequence and the same check code. The National Immigration Administration’s example is 932682198501010017.

Why the region may look old

A number keeps its first six digits for life, even when the county is later renamed, merged or renumbered. The tool therefore looks the code up in the Ministry of Civil Affairs lists from 1980 to 2025 and marks codes that are no longer current, such as 440524 潮阳县 in the standard’s second example.

At a glance

Price
Free. No sign-up, no watermark.
Privacy
Your text stays in your browser. Nothing is uploaded.
Works in
Chrome, Edge, Firefox and Safari, on phones and computers

Questions

Can it tell if an ID number is real (真假)?

No. It checks that the 18th character fits the first 17 and that the date is real. A number can pass and still never have been issued. Only the public security authorities can confirm a number.

Is the region where the person lives now?

No. The first six digits are the county where the number was first issued, and they don’t change when someone moves. Old county codes are still recognised and marked as old.

Why does my number end in X?

The check code can be 0–10, and 10 is written as the Roman numeral X, as GB 11643-1999 specifies.

Is the number sent anywhere?

No. The number is checked in your browser and nothing you type is sent to a server or saved.

身份证号码最后一位是X是什么意思?

The check code works out to 10, and the standard writes 10 as the Roman numeral X. It is part of the number, not a mistake.

Can I check a 15-digit number?

Old 15-digit numbers have no check code. Use the 15-to-18 converter, which adds 19 to the year and works out the check code.