Inclusive Taiwan Identification Number Validation
Tools for ensuring everyone has equal access to online services and platforms.
Hosted Validation Service
This ID number validation API covers all forms of legal resident ID numbers and is provided free of charge.
Example request:
https://v.identity.tw?id=G112233445
Example response:
{
"id": "G112233445",
"valid": true
}
Try it out:
Validation Libraries
These libraries cover all forms of legal resident ID numbers. Choose your language:
// Taiwan ID number validator.
//
// Accepts ROC national ID numbers, legacy ARC/APRC numbers (two leading
// letters, issued before 2021) and new-format ARC/APRC numbers (letter + 8/9,
// issued from 2021).
//
// Format: 1 letter, then 1/2 (citizen), A-D (legacy ARC) or 8/9 (new ARC),
// then 7 digits and a check digit.
const ID_PATTERN = /^[A-Z][12A-D89][0-9]{8}$/;
const LETTER_CODES = 'ABCDEFGHJKLMNPQRSTUVXYWZIO'; // index + 10 = the letter's numeric code
export function isValid(idNumber) {
const normalized = String(idNumber).toUpperCase();
if (!ID_PATTERN.test(normalized)) {
return false;
}
const letterCode = LETTER_CODES.indexOf(normalized[0]) + 10;
let sum = Math.floor(letterCode / 10) + (letterCode % 10) * 9;
// A letter in the second position (legacy ARC) counts as the last digit of its code.
const second = normalized[1];
const secondValue = /[A-Z]/.test(second)
? (LETTER_CODES.indexOf(second) + 10) % 10
: Number(second);
sum += secondValue * 8;
for (let i = 2; i < 9; i++) {
sum += (9 - i) * Number(normalized[i]);
}
sum += Number(normalized[9]);
return sum % 10 === 0;
}
"""Taiwan ID number validator.
Accepts ROC national ID numbers, legacy ARC/APRC numbers (two leading
letters, issued before 2021) and new-format ARC/APRC numbers (letter + 8/9,
issued from 2021).
Format: 1 letter, then 1/2 (citizen), A-D (legacy ARC) or 8/9 (new ARC),
then 7 digits and a check digit.
"""
import re
ID_PATTERN = re.compile(r'[A-Z][12A-D89][0-9]{8}')
LETTER_CODES = 'ABCDEFGHJKLMNPQRSTUVXYWZIO' # index + 10 = the letter's numeric code
def is_valid(id_number):
normalized = str(id_number).upper()
if not ID_PATTERN.fullmatch(normalized):
return False
letter_code = LETTER_CODES.index(normalized[0]) + 10
total = letter_code // 10 + (letter_code % 10) * 9
# A letter in the second position (legacy ARC) counts as the last digit of its code.
second = normalized[1]
if second.isalpha():
second_value = (LETTER_CODES.index(second) + 10) % 10
else:
second_value = int(second)
total += second_value * 8
for position in range(2, 9):
total += (9 - position) * int(normalized[position])
total += int(normalized[9])
return total % 10 == 0
<?php
// Taiwan ID number validator.
//
// Accepts ROC national ID numbers, legacy ARC/APRC numbers (two leading
// letters, issued before 2021) and new-format ARC/APRC numbers (letter + 8/9,
// issued from 2021).
//
// Format: 1 letter, then 1/2 (citizen), A-D (legacy ARC) or 8/9 (new ARC),
// then 7 digits and a check digit.
const TAIWAN_ID_PATTERN = '/^[A-Z][12A-D89][0-9]{8}\z/';
const TAIWAN_ID_LETTER_CODES = 'ABCDEFGHJKLMNPQRSTUVXYWZIO'; // index + 10 = the letter's numeric code
function isValid(string $idNumber): bool
{
$normalized = strtoupper($idNumber);
if (preg_match(TAIWAN_ID_PATTERN, $normalized) !== 1) {
return false;
}
$letterCode = strpos(TAIWAN_ID_LETTER_CODES, $normalized[0]) + 10;
$sum = intdiv($letterCode, 10) + ($letterCode % 10) * 9;
// A letter in the second position (legacy ARC) counts as the last digit of its code.
$second = $normalized[1];
$secondValue = ctype_alpha($second)
? (strpos(TAIWAN_ID_LETTER_CODES, $second) + 10) % 10
: (int) $second;
$sum += $secondValue * 8;
for ($i = 2; $i < 9; $i++) {
$sum += (9 - $i) * (int) $normalized[$i];
}
$sum += (int) $normalized[9];
return $sum % 10 === 0;
}
Coming soon
import java.util.Locale;
/**
* Taiwan ID number validator.
*
* Accepts ROC national ID numbers, legacy ARC/APRC numbers (two leading
* letters, issued before 2021) and new-format ARC/APRC numbers (letter + 8/9,
* issued from 2021).
*
* Format: 1 letter, then 1/2 (citizen), A-D (legacy ARC) or 8/9 (new ARC),
* then 7 digits and a check digit.
*/
public final class TaiwanId {
private static final String ID_PATTERN = "[A-Z][12A-D89][0-9]{8}";
private static final String LETTER_CODES = "ABCDEFGHJKLMNPQRSTUVXYWZIO"; // index + 10 = the letter's numeric code
private TaiwanId() {}
public static boolean isValid(String idNumber) {
if (idNumber == null) {
return false;
}
String normalized = idNumber.toUpperCase(Locale.ROOT);
if (!normalized.matches(ID_PATTERN)) {
return false;
}
int letterCode = LETTER_CODES.indexOf(normalized.charAt(0)) + 10;
int sum = letterCode / 10 + (letterCode % 10) * 9;
// A letter in the second position (legacy ARC) counts as the last digit of its code.
char second = normalized.charAt(1);
int secondValue = Character.isLetter(second)
? (LETTER_CODES.indexOf(second) + 10) % 10
: second - '0';
sum += secondValue * 8;
for (int i = 2; i < 9; i++) {
sum += (9 - i) * (normalized.charAt(i) - '0');
}
sum += normalized.charAt(9) - '0';
return sum % 10 == 0;
}
}
Transparency Report
See how online service providers compare.
| Category | Updated | Score | Details | |
|---|---|---|---|---|
| 104 iPhone App | Internet | 2026/08/29 | E |
|
| Ambassador Cinema | Entertainment | 2023/10/16 | A+ | |
| American Express Gold Credit Card | Finance | 2022/05/11 | A+ | |
| Bankee | Finance | 2024/05/25 | F |
|
| Bank of Taiwan Coin Set | Finance | 2023/09/20 | A+ | |
| Blizzard | Entertainment | 2023/09/20 | A+ | |
| Bureau of Labor Insurance | Government | 2021/08/25 | F |
|
| Car Tax - 使用牌照稅 | Government | 2022/04/12 | F |
|
| Cathay Century 國泰 – BeSafe 租借車安心遊 | Finance | 2026/09/06 | F |
|
| Cathay United Bank CUBE app | Finance | 2023/04/29 | F |
|
| Cathay United Bank - EZWallet | Finance | 2021/04/21 | C |
|
| Chiayi County Police Report | Government | 2025/06/27 | B |
|
| Compensation System for Quarantine | Health | 2022/05/11 | B |
|
| Costco | Retail | 2021/01/24 | B |
|
| Costco credit card | Finance | 2023/02/04 | F |
|
| CTBC Creditcard | Finance | 2022/06/14 | F |
|
| East Coast Travel Subsidy | Government | 2024/06/16 | F |
|
| EasyRent | Transportation | 2023/08/03 | F |
|
| E-Gov Portal Registration | Government | 2021/04/05 | A+ | |
| E-Invoice Platform | Government | 2021/08/25 | C |
|
| E-Invoice Platform API Access | Government | 2022/02/27 | F |
|
| E.Sun Bank Creditcard Application | Finance | 2021/05/04 | F |
|
| E.Sun eFingo | Finance | 2021/05/15 | F |
|
| EZPost | Government | 2022/01/18 | B |
|
| EZWay | Government | 2021/05/17 | E |
|
| Far Eastern Department Store App | Retail | 2021/05/15 | F |
|
| FarEastOne | Communication | 2022/11/01 | F |
|
| First Bank Creditcard application | Finance | 2021/02/25 | F |
|
| First Bank I-Bank | Finance | 2021/01/19 | F |
|
| Fubon COVID Vaccine Insurance | Health | 2021/05/13 | F |
|
| Fubon Insurance | Finance | 2021/03/08 | F |
|
| GamaPay 橘子支付平台 | Finance | 2022/01/05 | F |
|
| GoShare | Transportation | 2021/01/11 | E |
|
| Highway Police Traffic Offense Report | Government | 2026/08/29 | B |
|
| Hike Taiwan | Government | 2021/04/05 | B |
|
| Ikea Family Card | Retail | 2022/10/04 | E |
|
| iLeo Digital Account | Finance | 2024/05/25 | F |
|
| Jiaming Lake National Trail | Government | 2021/04/05 | C |
|
| JkoPay | Finance | 2023/09/24 | E |
|
| Jkopay x Richart | Finance | 2023/09/25 | F |
|
| Kaohsiung City Police Traffic Offense Report | Government | 2021/04/05 | B |
|
| King Bus (國光客運) | Transportation | 2023/04/10 | D |
|
| LINE Mobile | Communication | 2024/06/30 | C |
|
| Lohas Signup | Internet | 2022/05/14 | B |
|
| LuckyBo | Finance | 2026/09/06 | A+ | |
| Luna Cinemax | Entertainment | 2023/07/23 | F |
|
| Miramar Cinema | Entertainment | 2024/03/12 | F |
|
| Motor Vehicle Driver Information Service Account | Government | 2021/08/12 | F |
|
| MSIG Mingtai 明台 – 國內旅平租車險 | Finance | 2026/09/06 | F |
|
| MyData | Government | 2023/08/29 | A+ | |
| National Central Library | Government | 2023/08/17 | F |
|
| National Police Agency | Government | 2023/09/20 | F |
|
| New New Bank | Finance | 2023/07/15 | F |
|
| New Taipei City Government Citizen Services | Government | 2021/01/11 | A+ | |
| New Taipei City Police Traffic Offense Report | Government | 2021/06/24 | F |
|
| New Taipei City Traffic video upload platform | Government | 2025/09/05 | A+ | |
| NHI Card Number Query | Government | 2021/07/13 | F |
|
| O-Bank | Finance | 2021/08/02 | F |
|
| PCHome MyName | Internet | 2026/08/29 | F |
|
| PChome Prime Credit Card | Finance | 2021/05/04 | F |
|
| Rakuten Bank | Finance | 2021/01/20 | F |
|
| Rakuten Credit Card | Finance | 2023/10/16 | A+ | |
| Shen′ao Rail Bike 深澳鐵道自行車 | Transportation | 2025/09/05 | F |
|
| Showtime Cinemas | Entertainment | 2021/01/12 | A+ | |
| Sony Online Store | Retail | 2025/06/27 | A+ | |
| Taichung City Citizen Mailbox - Traffic Violation | Government | 2025/07/21 | F |
|
| Taichung City Police Traffic Report | Government | 2024/09/18 | B |
|
| Taipei City Police Traffic Offense Report | Government | 2021/06/24 | C |
|
| Taipei City Problem Report | Government | 2026/08/29 | F |
|
| Taipei Pass | Government | 2021/05/16 | E |
|
| Taishin Creditcard Gift | Finance | 2026/08/29 | C |
|
| Taishin Home Loan | Finance | 2022/03/26 | F |
|
| Taishin Richart | Finance | 2023/03/14 | F |
|
| Taiwan HSR | Transportation | 2026/08/29 | E |
|
| Taiwan Individual Savings Account (TISA) Portal | Government | 2025/07/01 | A+ | |
| Taiwan Railways | Transportation | 2026/08/29 | E |
|
| Tianchi Lodge | Government | 2021/04/05 | C |
|
| TRA Member Account | Transportation | 2022/05/13 | F |
|
| Tung’s Taichung Metro Harbour Hospital | Health | 2021/05/04 | F |
|
| Uber Eats - Costco Link | Retail | 2025/07/12 | A+ | |
| udnFunLife | Entertainment | 2021/01/16 | A+ | |
| Uni Air | Transportation | 2022/07/03 | E |
|
| Urich Financial Services | Finance | 2022/11/17 | F |
|
| Uride | Transportation | 2024/01/18 | F |
|
| Vespa | Retail | 2022/10/19 | F |
|
| Vieshow Cinemas | Entertainment | 2023/09/20 | A+ | |
| YouBike 2.0 | Transportation | 2021/01/11 | B |
|
| 台鐵e訂通 (Android) | Transportation | 2022/05/13 | C |
|
| 台鐵e訂通 (Apple) | Transportation | 2022/05/13 | C |
|
| 發票存摺+統一發票對獎機 | Finance | 2021/07/21 | C |
|
| 街利存帳戶 | Finance | 2023/08/14 | F |
|