Chinese ID Card Parser
Chinese ID Card Parser
18-digit checksum validation · region / birthday / gender / age
This tool parses ID numbers locally in your browser and never uploads any number. Do not enter other people ID numbers in public.
How to Use
📖 Tool Introduction
The Chinese ID Card Parser is a free local validator and decoder for the 18-digit Resident Identity Card number used in mainland China. A second-generation ID number is structured as 18 digits: the first six digits are an administrative region code, digits seven through fourteen are the birth date in YYYYMMDD format, digits fifteen through seventeen are a sequence number assigned to people born on the same date in the same region, where an odd seventeenth digit denotes male and an even one denotes female, and the eighteenth digit is a checksum computed from the first seventeen using the ISO 7064:1983 MOD 11-2 algorithm, with a value of 0 through 9 or X. This tool implements that checksum entirely in your browser: it multiplies the first seventeen digits by the weights 7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2, sums the products, takes modulo 11, and maps the remainder through the check-digit table 1, 0, X, 9, 8, 7, 6, 5, 4, 3, 2 to obtain the expected final character, which is then compared against the actual eighteenth digit. The tool also validates the birth date rigorously, including leap-year handling for February 29, so that numbers with the correct shape but an impossible date are rejected. Once the checksum passes, the results are shown as a grid of cards covering the province-level region, the region code, the birth date, gender, current age, checksum status and the sequence code, so you can quickly verify whether a number is well formed and read the public information encoded inside it. Everything runs locally and no number is ever uploaded. Because the tool only reads the encoding printed on the card itself, it is useful for form validation, data cleaning and teaching how the numbering scheme works, without needing access to any government database.
✨ Key Features
- Standard checksum: implements the weighted factor and mod 11 check table exactly as GB 11643 specifies
- Birth date validation: checks leap years and month lengths, rejects impossible dates such as February 30
- Region lookup: maps the first two digits to province, municipality or autonomous region names
- Gender and age: derives gender from the odd/even seventeenth digit and calculates current age from the birth date
- Status badge: green when valid, red with the expected check digit when wrong, so errors are obvious
- Fully offline: all computation happens in your browser, no number is sent to any server
📝 How to Use
- Type an 18-digit ID number into the input field (the last digit may be upper or lower case X)
- Click Parse ID or press Enter
- Read the status badge at the top: green means the checksum passes, red means a format or checksum error
- Explore the grid cards below for region, birthday, gender, age and other parsed fields
- Click Copy result to save the parsed information to your clipboard
⚠️ Notes
- Privacy: the tool only decodes the structure of the number and never contacts any database; do not enter other people numbers on shared devices
- Valid does not mean real: a passing checksum only means the number follows the encoding rules, not that it belongs to a real person
- Region granularity: the built-in table covers province-level codes; district-level codes are shown as raw digits without mapping
- Age calculation: age is computed as completed years based on today date; it increments once the birthday has passed this year
- 15-digit old cards: only 18-digit second-generation numbers are supported; 15-digit legacy numbers must be upgraded manually first