China Resident ID Generator
Generate 18-digit Chinese Resident Identity Card numbers with region, birth date and ISO 7064 check — synthetic test data only
For Development & Testing Purposes Only - Synthetic Mock Data
Settings
1 valueGenerates one value with a valid checksum. Press ⌘/Ctrl+Enter for a fresh one.
Generated value
No value yet
Set options, then press Generate.
Generated values are valid in shape but randomized (Test Data).
Examples
The GB 11643 example
11010519491231002XValid — region 110105, born 31 Dec 1949, check character XThis is the worked example printed in the standard, so it exercises the X branch of the checksum.
Wrong check character
110105194912310021Invalid — check character is 1 but the first 17 digits require X (ISO 7064 MOD 11-2)Only the final character differs, isolating the checksum from the date check.
Impossible birth date
110105194913310028Invalid — digits 7-14 (19491331) are not a valid birth dateMonth 13 is rejected before the check character is computed.
About this tool
The China Resident ID Generator creates one 18-character Resident Identity Card number following GB 11643-1999. The parts are a 6-digit administrative division code from GB/T 2260, an 8-digit YYYYMMDD birth date, a 3-digit sequence where odd values are male and even values are female, and a check character computed with ISO 7064 MOD 11-2 that can be the letter X.
Generation draws the division code from county-level codes in Beijing, Shanghai, Guangzhou, Shenzhen, Hangzhou, Chengdu, Wuhan and Nanjing and picks a birth date between 1950 and 2005, so outputs look like the records your form will see. The validator checks the province prefix against the GB/T 2260 list, rejects impossible dates such as month 13, and recomputes the ISO 7064 check character.
These numbers are synthetic test data for QA and development: never use them on real applications, KYC checks, tax filings, or identity documents, and DevTools accepts no liability for how generated data is used. Everything runs locally in your browser.
What this tool does not do
- The generator uses a small set of county codes, so outputs cluster around eight large cities.
- The check character validates the digits; it cannot confirm that the identity exists or that the details are real.
- The validator accepts any 1900-or-later birth date, not just dates inside the generator's 1950–2005 range.
- The 3-digit sequence is random, so generated values do not preserve any real registration ordering.
How to use this tool
Choose the Resident ID option
The tool is pinned to the 18-character Resident Identity Card number with the ISO 7064 MOD 11-2 check.
Generate a value
Click Generate to create one number with a county division code, a birth date and a 3-digit sequence.
Validate or copy
Switch to Validate to check a pasted number's province, date and check character, or copy the result and download it as .txt.
Use cases
KYC form fixtures
Populate identity fields in staging with values that pass province, date and checksum rules.
Date-branch coverage
Test that your parser rejects month 13 and accepts 29 February in a leap year.
X check character
Use the standard example to confirm your implementation handles the letter X as well as digits.
Resident ID number layout
| Positions | Meaning |
|---|---|
| 1-6 | Administrative division code (GB/T 2260) |
| 7-14 | Birth date, YYYYMMDD |
| 15-17 | Sequence; odd = male, even = female |
| 18 | Check character, ISO 7064 MOD 11-2 (0-9 or X) |
| Validation | Province prefix, real birth date and check character |
Generated division codes come from Beijing, Shanghai, Guangzhou, Shenzhen, Hangzhou, Chengdu, Wuhan and Nanjing.
Common mistakes
Mistake:Assuming the sequence is the person's age or region
Fix:The 3-digit sequence encodes sex by parity only and is otherwise issuer-assigned.
Mistake:Dropping the X check character
Fix:X is a valid check character, not an error; accept it in both lowercase and uppercase.
Mistake:Using any 6-digit prefix
Fix:The first two digits must be a province code listed in GB/T 2260.
Frequently asked questions
Are these real Chinese Resident IDs?
No. They are synthetic values for QA and development, never for real applications, KYC checks, tax filings, or identity documents. The structure is real, so a random value can coincide with an issued number; DevTools accepts no liability for how generated data is used.
What do the 18 characters mean?
Six digits are an administrative division code from GB/T 2260, eight are the YYYYMMDD birth date, three are a sequence where odd is male and even is female, and the last is an ISO 7064 MOD 11-2 check character.
Why can the last character be an X?
ISO 7064 MOD 11-2 yields eleven possible values, and 10 is written as X. Treat X as a valid check character, not an error.
Why is a month of 13 rejected?
Digits 7 to 14 must be a real calendar date. The validator checks the date before it recomputes the check character, so an impossible month fails first.
Which region codes does the generator use?
It draws county-level codes from Beijing, Shanghai, Guangzhou, Shenzhen, Hangzhou, Chengdu, Wuhan and Nanjing rather than the full GB/T 2260 table.
References & standards
Related tools
China USCC Generator
Generate synthetic 18-character Unified Social Credit Codes (统一社会信用代码) with GB 32100 and GB 11714 check characters.
VAT Number Generator
Generate VAT numbers for EU, UK, Switzerland, Norway and global tax integration testing.
Tax Number Generator
Generate valid tax identification numbers for testing (TR, US, SG, etc.)
National Identity Generator
Generate and validate national ID numbers for testing (TR, US, DE, UK, SA, AE, QA, KW, CA, ES, BR, FR, IT, NL, SE, NO, EG, SG)
Tax ID Validator
Auto-detect and validate VAT, EIN, TIN and GST identifiers with batch checksum reporting.