English
This page is available in English
The whole page — instructions, buttons and results.
Switch to English免费香港身份证号码校验工具。支持 1-2 个字母前缀 + 6 位数字 + 1 位校验码(0-9 或 A)。本工具完全在浏览器中运行,数据不上传。
香港身份证号码校验
使用方法
输入香港身份证号码
1-2 个英文字母 + 6 位数字 + 1 位校验码。支持「A123456(3)」或「AB1234569」两种写法。
自动加权求和
用算法权重 [9,8,7,6,5,4,3,2] 乘以每个字符值(A=1, B=2, ..., Z=26)。单字母 ID 会自动补一个隐含空格(值=36)。
求和后 mod 11
对加权和取 11 的余数,再用 (11 - 余数) % 11 计算预期校验码。10 → A,其它 → 0-9。
对比校验码
输入的校验码与算法计算的校验码必须一致才算通过。不一致即可能输错或并非真实 HKID。
香港身份证号码校验算法
香港特别行政区身份证(HKID)由香港入境事务处签发。号码格式为 1-2 个字母前缀 + 6 位数字 + 1 位校验码(写作括号内)。校验算法采用加权 + Mod 11方法,是公开规范,可在本地完整验证。
字母前缀的含义
单字母前缀(如 A、B、C)是最早期签发的身份证(1949 年起)。双字母前缀(如 AA、AB、AC...)从 1970 年代引入,以应对香港人口快速增长。当前在用的有 A-Z 单字母 + AA-WZ 双字母共数百种组合。
「Hong Kong 身份证 = 最早将公开校验码算法纳入身份证设计的政府」
实用场景
HKID 在香港无处不在:开户、签合同、办手机卡、入境/出境、医疗记录、税务。输入错误(漏字母、错数字)是日常烦恼。本工具5 秒本地验证,无需上传 — 数据完全留在浏览器。
隐私保护
本工具运行在浏览器内,身份证号从不上传、不记录、不储存。即使在不可信的网络上也安全使用。香港 PDPO(个人资料隐私条例)要求 HKID 不得随意搜集,本工具零网络设计完全符合此要求。
关于香港身份证的 10 个事实
HKID 是1949 年香港首批签发的身份证之一,是亚洲较早实施的强制 ID 系统。
校验码算法是公开规范,所有人都可本地校验(无需 API)。
双字母前缀从 1970 年代引入,应对香港人口从 200 万增到 700 万的爆发。
HKID 11 位(单字母)或 12 位(双字母)— 取决于前缀。
校验码可能是「A」— 表示模 11 余数为 10。
香港智能 HKID(电子芯片版)从 2003 年开始陆续换发,目前 100% 普及。
儿童 HKID(11 岁以下)与成人格式完全相同,只有持有人照片不同。
非永居 HKID(工作签证等)的格式与永居完全一样,无法从号码识别。
3.7 万种字母前缀组合(26 单字母 + 600+ 双字母)。
HK PDPO 要求 HKID 不得随意收集 — 本工具零网络设计完全符合。
常见问题
不。校验在浏览器内运行,身份证号从不上传、不记录、不储存。
不。只表示符合算法。要确认真实性需入境事务处查询。
是。当算法计算 Mod 11 余数 = 10 时,校验码为「A」(其它余数对应 0-9)。
单字母(A-Z)= 早期签发(1949 年起)。双字母(AA-WZ)= 1970 年后启用,应对人口增长。两者法律地位完全相同。
此页一次校验一个 — 为了隐私。批量场景请复制本页 JavaScript 算法到自己应用中。
不。工具会自动忽略空格、括号、连字符。「A123456(3)」和「A1234563」效果完全相同。
是。从号码本身无法识别永居 vs 非永居 — 这只能从身份证正面标记看出。
纸质版从 2003 年起逐步淘汰,2014 年完成换发。号码仍有效,但物理纸版不再被接受。
不一样。回乡证号(往来内地通行证)是 11 位数字,无字母,独立编号,与 HKID 无关。
是。RECATOOLS 所有工具完全免费,广告支持。无注册,无付费墙。
方法与来源
计算方式
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.
本工具依据的标准
- 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.
资料来源
- 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.
可能导致本页过时的因素
- 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.