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:
ID_REGEX = /^[A-Z]{1}[1-2A-D8-9]{1}[0-9]{8}$/;
ID_LETTERS = 'ABCDEFGHJKLMNPQRSTUVXYWZIO';
function isValid(id) {
id = id.toUpperCase();
if (!ID_REGEX.test(id)) {
return false;
}
let letterIndex = ID_LETTERS.indexOf(id[0]);
let sum = Math.floor(letterIndex / 10 + 1) + (letterIndex * 9);
// Legacy ARC
if ((/[A-Z]/).test(id[1])) {
sum += (ID_LETTERS.indexOf(id[1]) % 10) * 8;
} else {
sum += parseInt(id[1]) * 8;
}
for (i = 2 ; i < 9 ; i++) {
sum += (9 - i) * parseInt(id[i]);
}
sum += parseInt(id[9]);
return sum % 10 === 0;
}
import math
import re
ID_REGEX = '^[A-Z]{1}[1-2A-D8-9]{1}[0-9]{8}$';
ID_LETTERS = 'ABCDEFGHJKLMNPQRSTUVXYWZIO';
def isValid(id_no):
id_no = id_no.upper()
regex = re.compile(ID_REGEX)
if (regex.match(id_no) is None):
return False
letterIndex = ID_LETTERS.index(id_no[0])
checksum = math.floor(letterIndex / 10 + 1) + (letterIndex * 9)
# Legacy ARC
if (re.match('[A-Z]', id_no[1])):
checksum = checksum + (ID_LETTERS.index(id_no[1]) % 10) * 8;
else:
checksum = checksum + int(id_no[1]) * 8
for position in range(2, 9):
checksum = checksum + (9 - position) * int(id_no[position])
checksum = checksum + int(id_no[9])
if (checksum % 10) == 0:
return True
else:
return False
<?php
define("ID_REGEX", '/^[A-Z]{1}[1-2A-D8-9]{1}[0-9]{8}$/');
define("ID_LETTERS", 'ABCDEFGHJKLMNPQRSTUVXYWZIO');
function isValid($id_no)
{
$id_no = strtoupper($id_no);
if (preg_match(ID_REGEX, $id_no) != 1)
{
return false;
}
$letterIndex = strpos(ID_LETTERS, $id_no[0]);
$checksum = floor($letterIndex / 10 + 1) + ($letterIndex * 9);
// Legacy ARC
if (preg_match('/[A-Z]/', $id_no[1]) == 1)
{
$checksum += (strpos(ID_LETTERS, $id_no[1]) % 10) * 8;
} else {
$checksum += intval($id_no[1]) * 8;
}
for ($i = 2 ; $i < 9 ; $i++) {
$checksum += (9 - $i) * intval($id_no[$i]);
}
$checksum += intval($id_no[9]);
if (($checksum % 10) == 0){
return true;
} else {
return false;
}
}
?>
Coming soon
public class ValidId {
static final String ID_REGEX = "^[A-Z]{1}[1-2A-D8-9]{1}[0-9]{8}$";
static final String ID_LETTERS = "ABCDEFGHJKLMNPQRSTUVXYWZIO";
public static boolean isValid(String idNo) {
idNo = idNo.toUpperCase();
if (!idNo.matches(ID_REGEX)) {
return false;
}
int letterIndex = ID_LETTERS.indexOf(idNo.charAt(0));
int checksum = (int) Math.floor(letterIndex / 10 + 1) + (letterIndex * 9);
// Legacy ARC
if (Character.isLetter(idNo.charAt(1))) {
checksum += (ID_LETTERS.indexOf(idNo.charAt(1)) % 10) * 8;
} else {
checksum += Character.getNumericValue(idNo.charAt(1)) * 8;
}
for (int i = 2 ; i < 9 ; i++) {
checksum += (9 - i) * Character.getNumericValue(idNo.charAt(i));
}
checksum += Character.getNumericValue(idNo.charAt(9));
return checksum % 10 == 0;
}
}
Transparency Report
See how online service providers compare.
Category | Updated | Score | Details | |
---|---|---|---|---|
104 iPhone App | Internet | 2022/07/09 | F |
|
Ambassador Cinema | Entertainment | 2023/10/16 | A+ | |
American Express Gold Credit Card | Finance | 2022/05/11 | A+ | |
Bankee | Finance | 2023/10/16 | F |
|
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 United Bank CUBE app | Finance | 2023/04/29 | F |
|
Cathay United Bank - EZWallet | Finance | 2021/04/21 | C |
|
Chiayi County Police Report | Government | 2021/08/15 | F |
|
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 | 2021/06/24 | 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 |
|
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 |
|
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 |
|
NHI Card Number Query | Government | 2021/07/13 | F |
|
O-Bank | Finance | 2021/08/02 | F |
|
PCHome MyName | Internet | 2021/01/09 | 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+ | |
Showtime Cinemas | Entertainment | 2021/01/12 | A+ | |
Sony Online Store | Retail | 2021/01/15 | 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 | 2021/08/04 | F |
|
Taipei Pass | Government | 2021/05/16 | E |
|
Taishin Creditcard Gift | Finance | 2021/07/13 | C |
|
Taishin Home Loan | Finance | 2022/03/26 | F |
|
Taishin Richart | Finance | 2023/03/14 | F |
|
Taiwan HSR | Transportation | 2021/01/09 | E |
|
Taiwan Railways | Transportation | 2021/01/09 | 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 |
|
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 |
|