A Taiwan national ID number (身分證字號) is a letter and nine digits in four parts: the letter, a sex digit, a seven-digit serial and a check digit. Worked through every possible single change, the check digit alone lets 80 of 810 one-digit typos through, and it never notices the last two characters swapped, because both carry the same weight.
Residents without household registration in Taiwan have had numbers in the same layout since 2 January 2021, with 8 or 9 as the second character. The older resident numbers, two letters and eight digits, stay valid until 31 December 2030, the National Immigration Agency says, and stop on 1 January 2031.
The letter, a record of the office that assigned the number
The structure is set by a Ministry of the Interior regulation on the format of the ID card, whose Article 3 reads: 「前項編號首碼以英文字母代表直轄市、縣(市)別,第二碼至第十碼為數字碼,第二碼為性別碼,第十碼為檢查碼。」 The first character is a letter for the special municipality, county or city, the second is the sex code, and the tenth is the check digit. Numbers are assigned at birth registration or a first household registration, and the lettered number has been given from birth since July 1969, according to the Madou household registration office in Tainan.
Many pages that rank for the letter call it a birthplace. The regulation says only that it stands for a municipality, county or city, and our guide to Taiwan's 22 counties and cities shows that it records the office that assigned the number. That guide also covers the letters that outlived their counties: I and O are still Chiayi City and Hsinchu City, while L, R, S and Y name units that no longer exist.
Asked whether a number containing a 4 can be changed, the Ministry's household registration FAQ answers that the number 「為一組順序流水編號,並不具任何意義」, a sequential serial with no meaning, and should in principle be kept for life. A change for special circumstances is at the office's discretion, allowed once, and only if the number has never been changed before. A change of registered sex is a separate route: the Zhongzheng district household registration office in Taipei says it is handled by assigning a new number.
A Taiwan number carries no date of birth, unlike the Malaysian card number our guide to the 12 digits of a Malaysian IC takes apart.
The check digit, from a health-insurance file of 2009
No Ministry of the Interior or Immigration Agency page we opened gives the arithmetic. The earliest government print of it we found is a claim-file specification from the then Bureau of National Health Insurance, notice 健保醫字第0980091115號 of 31 July 2009, printed in the Executive Yuan Gazette of 5 August 2009, pages 23808 and 23809. It sets out how to check the ID field in a claim file.
The letter becomes a two-digit code from 10 to 35, out of alphabetical order at the end: I is 34, O is 35, W is 32, X is 30, Y is 31 and Z is 33. That makes ten digits before the check. Each is multiplied by 1, 9, 8, 7, 6, 5, 4, 3, 2 and 1 in turn, the last digits of the products are added, and the check digit is 10 minus the last digit of that sum, or 0 if the sum ends in 0. The gazette's own example, A123456789, ends in the check digit 9. Many code samples online use a second form, weights 1, 9, 8, 7, 6, 5, 4, 3, 2, 1 and 1 over all eleven digits with a total that must end in 0. The two always give the same answer.
We typed the gazette's rule into a separate program and ran it against the validator on our own site over 5,200,000 inputs, every letter with every second and tenth digit and 2,000 random serials. The two agreed on all of them. The same gazette also gives the rule for the old two-letter resident numbers, where the second letter's code is cut to its last digit, and a worked example, FA12345689, which also checks to 9.
The check's blind spot, the final pair of characters
Because the check is a simple weighted sum (modulo 10), its flaws can be calculated exactly, not just sampled. We changed every digit of the nine-digit part to every other value, 810 changes in all. The check digit alone lets 80 of them through, 9.9%. Ten of those are at the sex digit, where only 1, 2, 8 and 9 are allowed anyway, so with that rule the figure is 70 of 810. Half the misses fall on the fifth character, whose weight is 5: any change by an even amount there leaves the check unchanged.
Swapping two neighbouring characters is the error a weighted check is usually built to catch, and our general guide to what a check digit proves says that well-chosen weights catch it. Taiwan's catch every pair but one. Of the 720 neighbouring swaps of two different digits, the check spots all 630 from the second character to the ninth and none of the 90 that swap the ninth and tenth, because both carry the weight 1. Typing one wrong letter gets through 44 times in 650.
None of this says a number belongs to anyone. A number that passes has the right arithmetic, which is all a check digit can tell you.
The resident number, a copy of the citizen layout since 2021
The Immigration Agency's Q&A on resident numbers defines the 統一證號 as 「外國人、無戶籍國民、香港澳門居民及大陸地區人民在臺使用之身分識別碼」: the identifier used in Taiwan by foreign nationals, nationals without household registration, Hong Kong and Macau residents, and people of the Mainland Area. Numbers issued from 2 January 2021 are one letter and nine digits, with 8 for male and 9 for female in the second place. Those issued up to 1 January 2021 are two letters and eight digits.
For these numbers the letter means something different. The Agency says it is 「依申請地區分」, set by the place of application, in the same letter scheme as citizens. Its news service adds that the second letter became a sex digit, that a third-position code follows, and that the change let holders buy transport tickets and shop online more easily. Old numbers are switched automatically when a holder's case changes, and the switch period runs from 2 January 2021 to 31 December 2030. Banks can check a resident number through the Agency's lookup for new and old numbers.
Our validator, which turned away every old-format resident number
We built 20,800 old-format resident numbers that pass the gazette's rule. Until 2 October 2026, our Taiwan ID validator marked every one of them invalid, although the state honours them until the end of 2030. It also rejected numbers typed in a Chinese input method's full-width mode, cut off pasted numbers containing spaces before it could strip them, called 8 and 9 numbers "foreign" resident numbers, and listed I and O among the letters for vanished counties. It now checks old-format numbers with the gazette's rule, accepts full-width and spaced input, and labels resident numbers by the Agency's own categories.
The privacy law, which names the number outside its special categories
Taiwan's Personal Data Protection Act (個人資料保護法) names 「國民身分證統一編號」 in its Article 2 as personal data. Article 6, which sets stricter rules for special categories, lists medical records, medical treatment, genetic data, sex life, health checks and criminal records, and the ID number is not among them.
Amendments passed in 2023, which make a Personal Data Protection Commission the competent authority, and in November 2025 have no date of effect yet; the law database marks it 「未定」, to be set by the Executive Yuan. The digital ID card is on hold for the same reason. The Executive Yuan suspended it on 21 January 2021, and on 31 July 2024 the Ministry of the Interior said it would be taken up again once the commission is set up. On 2 October 2026 the law database still listed the amendments' date of effect as undecided.
The official mask, worth three hidden digits
Since a National Development Council letter of 31 December 2014, government agencies have been told to show the ID number with its last four characters, the seventh to the tenth, replaced by 「*」 in letters, websites and forms, unless a specific use requires otherwise. The letter's reason was that agencies masked different characters, so that personal data 「易遭有心人士蒐集後直接或間接識別」, could easily be gathered and used to identify someone. The copy we read is hosted by National Dong Hwa University.
The tenth character is calculated from the other nine, so it carries no information of its own. Of the 10,000 ways to fill the four stars, only 1,000 pass the check. The four-character mask hides three digits' worth of the number, and the star over the check digit hides nothing.