Hong Kong HKID Generator
Generate Hong Kong identity card numbers with the mod-11 check character — 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
Single-letter HKID
HKID · GenerateA123456(3)Letter A, six digits and check character 3 in brackets.
Two-letter HKID
HKID · GenerateAB987654(3)Two letters use both letter weights before the six digit weights.
Wrong check character
A123456(4)Invalid — check character is 4 but A123456 requires 3The validator names the character the body requires.
About this tool
The Hong Kong HKID Generator produces identity card numbers as one or two letters, six digits and a check character in brackets, for example A123456(3). Two-letter cards such as AB987654(3) are supported, and the brackets are presentation only — the validator accepts the number with or without them.
The check character comes from letter values A=10 through Z=35, with a missing first letter counted as 36 for single-letter cards. The two letter positions are weighted 9 and 8, the six digits 7 down to 2, and the check is 11 minus the sum mod 11; a result of 10 is written A and a result of 11 is written 0.
These are synthetic values for QA and development, never for real applications, KYC checks, tax filings or identity documents; a random value can coincidentally match a real, issued number, and DevTools accepts no liability for how generated data is used. Everything runs locally in your browser.
What this tool does not do
- Validation confirms the check character only, not that the card was issued.
- The generator draws from a small letter set, so not every valid prefix appears in output.
- The card layout, photo and other printed features are outside this tool.
- No Immigration Department lookup is performed.
How to use this tool
Generate one HKID
Click Generate to create a letter, six digits and the mod-11 check character in brackets.
Copy the value
Copy the formatted number or download it as a .txt file.
Validate either form
Switch to Validate and paste a value with brackets, without brackets, or in lowercase; the parser normalizes it.
Use cases
Hong Kong onboarding
Fill identity fields with HKIDs that pass the mod-11 check before testing account creation.
Bracket and case handling
Confirm that your parser normalizes brackets, spaces and lowercase letters.
Single versus two letters
Exercise the 36 placeholder value that applies when the first letter is missing.
HKID structure and check
| Part | Rule |
|---|---|
| Format | 1 or 2 letters + 6 digits + check character |
| Letter values | A=10 through Z=35; a missing first letter counts 36 |
| Weights | Letters 9 and 8; digits 7, 6, 5, 4, 3, 2 |
| Check formula | 11 − (sum mod 11) |
| Check mapping | 10 is written A, 11 is written 0 |
| Brackets | Not part of the number and optional on input |
Both single-letter and two-letter cards are generated and validated.
Common mistakes
Mistake:Storing the brackets
Fix:They are display characters; the number is the letters, digits and check character.
Mistake:Computing a single-letter card as if it had two letters
Fix:A missing first letter counts as 36 in the first weighted position.
Mistake:Rejecting check character A or 0
Fix:10 maps to A and 11 maps to 0, so both are valid.
Frequently asked questions
Are these real HKIDs, and can I use them in production?
No. They are synthetic test values for QA and development, never for real applications, KYC checks, tax filings or identity documents; a random value can coincidentally match a real, issued number, and DevTools accepts no liability for how generated data is used.
How is the HKID check character calculated?
Letters map to A=10 through Z=35, with a missing first letter counting as 36. Letters are weighted 9 and 8 and digits 7 down to 2, and the check is 11 minus the sum mod 11.
Why can the check character be A or 0?
A result of 10 is written as A and a result of 11 as 0, so both appear as valid check characters.
Do I need the brackets?
No. The brackets are presentation only, and the validator accepts A123456(3), A1234563 or a lowercase version of either.
Are two-letter HKIDs supported?
Yes. Both single-letter and two-letter numbers are generated and validated, using the 36 placeholder when the first letter is absent.
References & standards
Related tools
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.