Skip to content
UniKit

ID card number extractor

Batch-extract 18-digit (last character may be X) and legacy 15-digit Chinese resident ID numbers, actually computing the GB 11643-1999 weighted mod 11-2 check character and verifying a real birth date — with an option to keep only the numbers that pass.

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

Text to scan

Extracted numbers

One item per line, ready to copy.

Paste text to extract ID numbers

Matches: 0 · Unique: 0 · Valid: 0 · Invalid: 0

What this tool does

  • Harvest ID numbers from tickets, exports or chat logs and see immediately whether a digit was mistyped.
  • Run a data-quality pass: keep only the numbers that pass so you know exactly which records to re-check.
  • Catch both 18-digit and legacy 15-digit numbers during a migration so nothing is silently dropped.

Example

Input

Valid 440306198012120038; 440306198012120039 has a wrong check character and must fail validation.

Output

440306198012120038
440306198012120039

The check character is the weighted sum of the first 17 digits (weights 7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2) mod 11, mapped through 10X98765432. Change one digit and it no longer matches.

Frequently asked questions

How is the check character computed?

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 taken mod 11, then mapped through 10X98765432 — remainder 0 gives 1 and remainder 2 gives X.

Do 15-digit legacy numbers have a check character?

No. That format is a region code plus a birth date (YYMMDD, always read as 19xx) plus a sequence number, so only the birth date is validated.

What happens with an impossible birth date?

The number fails validation — 19900230 does not exist, so even a correct-looking check character will not pass.

Does “valid” mean the person exists?

No. It only means the number is formally well formed: length, characters, birth date and check character. Nothing is sent anywhere and no database is queried.

How much text can it handle?

Two million characters, after which it reports an error instead of freezing the main thread.

Keywords:身份证提取身份证号提取id card extractorGB 11643校验位加权模11身份证正则批量提取身份证

Related tools