esc
ID checkers

HKID check digit:
香港身份證

Type an HKID without the bracket to get its check digit, or with it to see whether it is right.

More tools for Hong Kong Other countries

How to use HKID check digit

  1. 01Type the HKIDWith or without the bracket.
  2. 02Get the digit0 to 9 or A.
  3. 03See the workingValues, weights, remainder.
Front and back of an ID card on one sheet of paper

A123456 → (3).

The digit in brackets on a Hong Kong identity card is worked out from the letters and digits before it: each is given a value, multiplied by 9 down to 2, and the total is divided by 11. The tool does the sum and explains the A and 0 cases.

The number in brackets on a Hong Kong identity card is a check digit. This page shows how to calculate the HKID check digit by hand and why it is sometimes A. The calculator above does the same steps and shows them.

How to calculate the HKID check digit

Example A123456: 36 × 9 + 10 × 8 + 1 × 7 + 2 × 6 + 3 × 5 + 4 × 4 + 5 × 3 + 6 × 2 = 481. 481 ÷ 11 leaves 8, and 11 − 8 = 3, so the full number is A123456(3).

Some explanations use A = 1, B = 2 and weights 8 to 2 for one-letter numbers. That version always gives the same digit, because the differences cancel out after dividing by 11.

  1. If the number has one letter, put a space in front of it so there are 8 characters. The space counts as 36.
  2. Give each letter a value: A = 10, B = 11 … Z = 35. Digits keep their own value.
  3. Multiply the 8 values by 9, 8, 7, 6, 5, 4, 3, 2 and add up the products.
  4. Divide the total by 11 and take the remainder.
  5. The check digit is 11 minus the remainder. If that is 10, write A. If it is 11, write 0.

Two-letter numbers

Some HKIDs start with two letters. Then there is no space to add: both letters count, the first multiplied by 9 and the second by 8, and the six digits by 7 down to 2 as usual.

The prefix letters show roughly when and how a number was first issued, but the Immigration Department doesn’t publish a list of what each one means, so the tool doesn’t try to decode them.

Is the bracket digit part of the number?

Officially, no: the Government describes it as a check digit added to make computer processing more reliable. In practice most banks, employers and online forms ask for it, and the Digital Policy Office’s data standard stores it as a separate field next to the number.

The Immigration Department doesn’t publish the calculation. The rule above is the one used by long-standing independent checkers, such as David Webb’s Webb-site generator and the Business::HK::IdentityCard library, and it gives the expected digit for the standard example A123456(3).

At a glance

Price
Free. No sign-up, no watermark.
Privacy
Your text stays in your browser. Nothing is uploaded.
Works in
Chrome, Edge, Firefox and Safari, on phones and computers

Questions

Why is the digit in brackets sometimes A?

The calculation can give 10, and 10 is written as A. A result of 11 is written as 0.

Is the bracket digit part of my ID number?

Officially no. It is a check digit added to help computers catch typing mistakes, but many forms ask for it, so it is worth getting right.

Does this work for two-letter numbers like WX?

Yes. Two-letter prefixes use both letters in the sum; a one-letter prefix gets a space in front that counts as 36.

Does a valid result mean the HKID exists?

No. It means the bracket digit fits the letters and digits before it. The tool doesn’t look anything up, so it can’t tell whether the number was issued or whose it is.

Is my HKID sent anywhere?

No. Everything runs in your browser. Avoid pasting your ID into sites you don’t trust.

My HKID ends in (A). Is that a mistake?

No. A means the calculation gave 10, which can’t be written as a single digit.

Can I type it without brackets?

Yes. A1234563, A123456(3) and A123456 (3) are all read the same, and full-width brackets work too.

Why does the sample card C668668(E) fail?

The sample identity cards in Immigration Department publicity carry check digits that don’t fit, and E can never be a check digit. Sample numbers are made that way on purpose, so don’t use them to test a checker.

Should I paste my real HKID into websites?

Only where you trust the site. This page doesn’t send or store anything, but a check digit is easy to calculate yourself with the steps above.