logo

Hong Kong Identity Card Validator

China Resident ID Validator
Macau Resident ID Validator
Generate test HKID numbers or validate Hong Kong identity card format and check digit.
logo
Paji Toolset
Hong Kong Identity Card Validator

Hong Kong Identity Card Validator

China Resident ID Validator
Macau Resident ID Validator
Generate test HKID numbers or validate Hong Kong identity card format and check digit.

About the HKID generator and validator

Generate samples or validate an existing HKID

Use the random generator when you need format-valid HKID test values for QA, demos, or form validation tests. Paste an existing value to see whether its prefix, body digits, and check digit follow the public HKID rules.

One-letter, two-letter, and check digit rules

The validator normalizes common HKID formats such as A123456(3), AB123456(7), or A1234563. It recalculates the weighted mod-11 check digit, including the special A value when the remainder requires it.

Browser-side calculation and safe testing

Generation and validation run locally in your browser. Generated HKIDs are test values for testing and learning; the tool does not issue official IDs or check whether a value belongs to a real person. Do not use them for impersonation or official identity workflows, and avoid sharing links that contain real personal identifiers.

FAQ

Common questions and answers about this topic.

Can this tool generate a valid-looking HKID for testing?

Yes. The generator creates format-valid HKID test values with one-letter or two-letter prefixes, six body digits, and a matching check digit. Use them for QA, demos, or form testing only.

How is the HKID check digit calculated?

Letters are converted to numeric values, single-letter HKIDs use a leading space value of 36, and all positions are multiplied by weights from 9 to 1. The weighted sum must be divisible by 11; the final digit may be 0-9 or A.

Which HKID formats can I paste?

You can paste common formats such as A123456(3), AB123456(7), or A1234563. Parentheses around the check digit are optional, and the tool normalizes spacing before validation.

Are generated HKID numbers official or assigned to real people?

No. Generated values only follow public format and check-digit rules. This tool does not issue HKIDs or check government records, so generated values must not be treated as proof of identity, assigned personal data, or usable in any official process.

Is my HKID uploaded to a server?

No. Validation and generation are calculated in your browser. The current value may appear in the shareable page URL, so use generated samples when sharing links and avoid entering real personal identifiers.