International · Validation

Hong Kong ID card validator.

Check a Hong Kong identity card number such as A123456(3). Enter it with or without the brackets. The tool recomputes the check digit and shows the one it expects. Format and checksum only.

How it works: give each letter a value (A = 10 to Z = 35). A one-letter prefix is treated as a leading space worth 36. Multiply the two prefix values and the 6 digits by 9, 8, 7, 6, 5, 4, 3, 2 and add them. The check digit is 11 minus (total mod 11), with 10 written as A and 11 as 0.

Source: WikipediaWorked example A123456(3) reproduced by hand

Advertisement

Inputs

Spaces and hyphens are ignored. Only try numbers you are entitled to use.

Result

Enter a number and press Validate.

How the HKID check works

The algorithm, step by step
StepWhat happens
1Give each prefix letter a value (A = 10 … Z = 35). With a one-letter prefix, the first value is 36 (a space) and the second is the letter
2Multiply the prefix values by 9 and 8, then the six digits by 7, 6, 5, 4, 3, 2
3Add everything and take the total mod 11
4Check digit = 11 minus that remainder; 10 is written A and 11 is written 0

Worked example

A123456(3): 36×9 + 10×8 + 1×7 + 2×6 + 3×5 + 4×4 + 5×3 + 6×2 = 481. 481 mod 11 = 8. 11 − 8 = 3, so the check digit is 3.

The digit in brackets is not part of the number

Hong Kong's Immigration Department notes the bracketed digit is appended to facilitate computer processing. Many forms ask for it separately or leave it out, so this tool accepts both forms.

Checksum only, not a register lookup

A passing result means the characters are consistent with each other. It does not confirm that the number was issued or that it belongs to anyone. Use it as a typo and format check. For the same kind of check on a Canadian number, see the SIN validator, or browse all ID and number validators.

Sources: Wikipedia, Hong Kong identity card (number format and check digit); Hong Kong Immigration Department, The Smart Identity Card.

Frequently asked questions

Why is there a number in brackets on a Hong Kong ID card?

It is a check digit. It is calculated from the letter and the six digits so a mistyped number can be caught by software.

Can the HKID check digit be a letter?

Yes. When the calculation gives 10 the check digit is written as A. A result of 11 is written as 0.

Does a valid check digit prove the card is real?

No. It proves the number is internally consistent. Only the Immigration Department can confirm a number was issued.

Format and checksum only

This tool checks format and checksum entirely in your browser. It does not query any register, and a passing result is not proof the number was issued or belongs to anyone. Nothing you type is transmitted, stored, or logged.

Advertisement
Advertisement