Hong Kong HKID format validator. Verifies the official checksum algorithm for 1-2 letter prefixes + 6 digits + 1 check character. Browser-only — your ID never leaves the page.
Hong Kong HKID Format Validator (香港身份证)
How to use
Enter HKID
1-2 letter prefix + 6 digits + 1 check character. Both "A123456(3)" and "AB1234569" formats are accepted.
Weighted sum
Multiply each character value (A=1, B=2, ..., Z=26) by weights [9,8,7,6,5,4,3,2]. Single-letter IDs get an implicit leading space (value=36).
Mod 11 → check
Take sum mod 11, then compute (11 - r) % 11. Result 10 → "A", else digit 0-9.
Compare check character
Your entered check character must match the computed one. Mismatch = typo or not a real HKID.
About the Hong Kong HKID checksum
The Hong Kong Identity Card (HKID) is issued by the Hong Kong Immigration Department. The number format is 1-2 letter prefix + 6 digits + 1 check character (shown in parentheses). The checksum algorithm uses weighted sum + Mod 11 — a public specification, fully verifiable offline.
What the letter prefix means
Single-letter prefixes (A, B, C, etc.) were the earliest HKIDs issued (from 1949). Double-letter prefixes (AA, AB, AC...) were introduced in the 1970s to accommodate Hong Kong's rapid population growth. Currently active: A-Z single + AA-WZ double letter combinations, totalling several hundred series.
"Hong Kong's HKID was among the first government IDs to publish its check-digit algorithm openly."
Practical use cases
HKID is ubiquitous in Hong Kong: bank accounts, contracts, SIM cards, border crossings, medical records, tax filings. Typos (missing letter, swapped digit) are a daily annoyance. This tool validates in 5 seconds locally — no upload, no signup, data stays in your browser.
Privacy stance
The tool runs entirely in your browser; the HKID is never uploaded, logged, or stored. Safe to use on untrusted networks. Hong Kong's PDPO requires HKIDs not be collected unnecessarily — our zero-network design complies fully.
10 facts about HKID
HKID was first issued in 1949 — among the earliest mandatory national ID systems in Asia.
The checksum algorithm is public — anyone can validate offline (no API needed).
Double-letter prefixes (AA, AB...) were introduced in the 1970s as HK's population grew from 2M to 7M.
HKID is 11 chars (1-letter) or 12 chars (2-letter) including the check character.
The check character can be "A" — meaning Mod 11 remainder = 10.
Smart HKID (chip card) rollout began 2003 — now 100% adopted.
Child HKIDs (under 11) use the same number format as adults — only photo differs.
Non-permanent HKIDs (work visa, etc.) have the same format as permanent — indistinguishable by number alone.
~37,000 letter-prefix combinations possible (26 single + 600+ double).
HK PDPO restricts HKID collection — this tool's zero-network design fully complies.
Frequently Asked Questions
No. Validation runs entirely in your browser — your HKID is never uploaded, logged, or stored.
No. It only means the format satisfies the algorithm — about 9% of random IDs pass. Real authenticity requires HK Immigration verification.
Yes. When the algorithm computes Mod 11 remainder = 10, the check character is "A". All other remainders produce digit 0-9.
Single letter (A-Z) = early issuance (from 1949). Double letter (AA-WZ) = introduced post-1970 to accommodate population growth. Both have identical legal standing.
This page validates one at a time for privacy. For bulk use, copy the JavaScript algorithm from this page into your own code (no API needed).
No. The tool ignores spaces, parentheses, and hyphens. "A123456(3)" and "A1234563" are treated identically.
Yes — the number alone cannot distinguish permanent vs non-permanent. That info is only on the card's face.
Paper HKIDs were phased out 2003-2014. The number remains valid, but the physical paper card is no longer accepted.
No. Home Return Permit numbers are 11 digits (no letters) — a separate numbering system unrelated to HKID.
Yes. All RECATOOLS tools are 100% free, ad-supported. No signup, no paywall.
Method & sources
How it computes
An HKID is one or two letters, six digits and a check character. Each letter is valued A=10 through Z=35, and a one-letter number is treated as having an implied leading space worth 36 so that every number is eight characters long. Those eight are multiplied by the weights 9, 8, 7, 6, 5, 4, 3, 2, the products summed, and the check character is (11 − sum mod 11) mod 11 — where 10 is written as the letter A. The tool checks that the character you typed matches.
What this tool implements
- The weighted-sum-mod-11 algorithm as published, including the implied leading space that makes a one-letter prefix arithmetically equivalent to a two-letter one.
- A check value of 10 is written as the letter A, which is why an HKID check character can be a letter while the six preceding characters cannot.
- ⚠️ THIS VALIDATES A FORMAT, NOT A PERSON. A number that passes is well-formed; it is not evidence that the number was ever issued, or that it belongs to anyone. No register is consulted and none could be.
- Input is checked in the browser and is neither stored nor transmitted. An identity-card number is personal data and this tool never sends one anywhere.
Sources
- Registration of Persons Ordinance (Cap. 177): https://www.elegislation.gov.hk/hk/cap177 — the legislation under which the Hong Kong identity card is issued and its particulars recorded. It governs the card; it does not specify the number's arithmetic.
- ⚠️ THE CHECK-DIGIT ALGORITHM IS NOT OFFICIALLY PUBLISHED. The Immigration Department documents the card and how to apply for one (https://www.immd.gov.hk/eng/services/hkid/general_info.html) but does not set out the number's structure or its check character. What is implemented here is the widely reproduced description — A=10 to Z=35, an implied space of 36 for a one-letter prefix, weights 9 down to 2, and (11 − sum mod 11) mod 11 with 10 written as A — and saying so is more honest than citing a government page that does not contain it.
What can make this go out of date
- None at runtime. The algorithm has been stable for decades; what changes is which letter prefixes the Immigration Department has issued, and that affects whether a number exists rather than whether it is well-formed.
Pick up where you left off
Stored only in this browser — never sent to our servers.