Hong Kong ID Validator - Online HKID Check Digit Verification
Free Hong Kong ID validator: checks the letter prefix, six digits, and parenthesized check character (weighted mod 11) locally. Format validation only.
This tool runs in your browser: what you enter is processed on your device and normally never appears in a request to any server.
Usage Guide
A Hong Kong Identity Card number is one or two letters, six digits, and a check character in brackets. This tool recomputes the bracketed check character from the Immigration Department’s published arithmetic (complement-of-11). Format-only and local — it connects to no registry and says nothing about validity.
1. How to validate
Everything runs locally. Treat it as the first gate: a format-invalid number should not proceed into onboarding flows.
- Paste the full number, e.g., AB123456(7). Western or Chinese brackets are both accepted.
- Validate: letter count and digit count first, then the recomputed check character, then a digit-by-digit breakdown.
- A check character of A is valid — a complement of 10 is written as A.
2. Structure of the number
Current common format: 1-2 uppercase letters, six digits, and one bracketed check character (0-9 or A). There is no public semantic table for the letter prefixes — combinations are issued sequentially — so the validator checks structure and check character only, without interpreting the letters.
3. The complement-of-11 algorithm
Letters fold to A=1…Z=26: with a single letter it carries weight 8 (plus a fixed placeholder weight), with two letters the first takes 9 and the second 8; the six digits take weights 7,6,5,4,3,2. Sum everything, take the remainder mod 11, and subtract from 11 to get the check character; 10 becomes A and 11 becomes 0. Same complement family as mainland IDs, but a different weight table — do not mix them.
4. Common questions
- Missing brackets: the check character must be present; pasting only the 7-8 main characters fails as incomplete.
- Lowercase letters are normalized automatically.
- Smart ID cards carry the same numbering rules — the card form changed, the arithmetic did not.
- Check-code mismatch: almost always transcription (digit transposition first); verify character by character before suspecting the document.
5. Compliance boundary
Arithmetic self-consistency only: not proof the card exists, was issued, or belongs to anyone. HKID numbers are personal data — collect minimally and store masked in production, consistent with the PDPO. Use synthetic numbers for integration tests; flipping one digit yields an instant negative sample.
FAQ
Yes — the arithmetic recheck runs on your machine only; the number is neither uploaded nor stored, and there is no signup.
Yes — a complement of 10 is written as A. The tool passes it with a note.
No. The tool recomputes the published check-code arithmetic only — it says nothing about issuance, registration, or the holder.
Yes — one-letter and two-letter prefixes are both current legal forms with their own weight handling.
Yes — besides half-width parentheses, Chinese bracket forms are recognized too; but if the bracketed check character is missing altogether, the tool reports an incomplete format, because that digit must take part in the computation.
Construct synthetic numbers and corrupt one check digit for negative cases; never test with other people's real IDs.