The National Identification Card of Taiwan. This page is generated from the registry metadata of the library.
| Property | Value |
|---|---|
| Country code | TWN, TW |
| ID type | National Identification Card |
| Official name | 國民身分證統一編號 |
| Also known as | National ID Number; 國民身分證統一編號; 身分證字號 |
| Display format | X######### |
| Input masks | L######### |
| Length | 10 |
| Example | A123456789 |
| Checksum | yes |
| Checksum algorithm | Weighted sum mod 10 (location letter → two digits; weights 1,9,8,7,6,5,4,3,2,1; check = (10 - remainder) mod 10) |
| Parsable | yes |
The root entry registers every country:
import { validateNationalId } from 'idnumbers';
validateNationalId('TWN', 'A123456789').isValid; // true
To bundle only this country, import its definition from idnumbers/countries/twn and pass it to register():
import { register, validateNationalId } from 'idnumbers/core';
import { country } from 'idnumbers/countries/twn';
register(country);
validateNationalId('TWN', 'A123456789').isValid; // true