idnumbers
    Preparing search index...

    The National Identity Card Number of Thailand. This page is generated from the registry metadata of the library.

    Property Value
    Country code THA, TH
    ID type National Identity Card Number
    Official name บัตรประชาชน (Population Identification Code)
    Also known as National ID Number; Population Identification Code; บัตรประชาชน; รหัสบัตรประชาชน
    Display format #-####-#####-##-#
    Input masks #-####-#####-##-#
    Length 13 to 17
    Example 3101012345673
    Checksum yes
    Checksum algorithm Weighted sum mod 11 (weights 13..2; check = (11 - remainder) mod 10)
    Parsable yes

    The root entry registers every country:

    import { validateNationalId } from 'idnumbers';

    validateNationalId('THA', '3101012345673').isValid; // true

    To bundle only this country, import its definition from idnumbers/countries/tha and pass it to register():

    import { register, validateNationalId } from 'idnumbers/core';
    import { country } from 'idnumbers/countries/tha';

    register(country);
    validateNationalId('THA', '3101012345673').isValid; // true