DevTools Logo

Thai National ID Generator

Thai National ID Generator

Generate 13-digit Thai citizen ID numbers with the mod-11 check digit — synthetic test data only

Runs in your browser

For Development & Testing Purposes Only - Synthetic Mock Data

Settings

1 value

Generates one value with a valid checksum. Press ⌘/Ctrl+Enter for a fresh one.

Generated value

No value yet

Set options, then press Generate.

Generated values are valid in shape but randomized (Test Data).

Legal Disclaimer: Generated data is for software testing and validation purposes only (e.g. verifying input masks, form validation, or database seeding). It is randomly generated and not taken from any real record, but a random value can coincidentally match a real, issued number, so never use it in real applications, payments, KYC or official forms. Using it to impersonate real people or for any fraudulent activity is illegal. DevTools accepts no liability for how generated data is used.

    Examples

    Generated citizen ID

    Input
    Citizen ID · Generate
    Output
    3-1006-00445-63-5

    Category digit 3, the grouped display and the mod-11 check digit 5.

    Plain-digit validation

    Input
    3100600445635
    Output
    Valid — check digit 5 matches the first 12 digits

    Separators are optional, so the same number validates without hyphens.

    Wrong check digit

    Input
    1-2345-45678-78-9
    Output
    Invalid — check digit is 9 but the first 12 digits require 1

    The validator prints the digit the first 12 digits require.

    About this tool

    The Thai National ID Generator produces 13-digit citizen identification numbers, usually written as 1-2345-67890-12-3. The first digit from 1 to 8 is the person category, while 0 is reserved for juristic persons, so a personal ID never starts with 0 or 9.

    The check digit applies weights 13, 12 and down to 2 over the first 12 digits, sums the products, and computes (11 minus the sum mod 11) mod 10. Validation strips hyphens and spaces, rejects a leading 0 or 9 with a message about the person category, and otherwise prints the expected check digit when the final digit is wrong.

    These are synthetic values for QA and development, never for real applications, KYC checks, tax filings or identity documents; a random value can coincidentally match a real, issued number, and DevTools accepts no liability for how generated data is used. Everything runs locally in your browser.

    What this tool does not do

    • Validation confirms the category digit and check digit only, not that the number was issued.
    • The generator never emits 0 or 9 as the first digit, so those prefixes appear only in pasted samples.
    • No population-registry lookup is performed.
    • The tool covers citizen IDs only; company TINs have a separate generator.

    How to use this tool

    1. Generate one citizen ID

      Click Generate to create a 13-digit number with a person-category digit from 1 to 8 and a valid check digit.

    2. Copy the value

      Copy the result with its hyphens or download it as a .txt file.

    3. Validate a pasted number

      Switch to Validate to check the category digit and recompute the mod-11 check digit.

    Use cases

    Thai onboarding forms

    Fill national-ID fields with values that pass the mod-11 check.

    Category prefix tests

    Confirm that your form rejects a leading 0, which marks a juristic person rather than a citizen.

    Formatting variants

    Test grouped, hyphenated and plain-digit input for the same number.

    Thai citizen ID structure

    PartRule
    Length13 digits
    First digit1–8 for persons; 0 is used for juristic persons
    Check weights13, 12 … 2 over the first 12 digits
    Check formula(11 − sum mod 11) mod 10
    Display1-2345-67890-12-3
    Input handlingHyphens and spaces are ignored

    Company numbers that start with 0 belong to the Thailand TIN tool.

    Common mistakes

    Mistake:Using a leading 0 for a person

    Fix:0 marks juristic persons; personal IDs start with 1 to 8.

    Mistake:Computing weights from left to right as 2…13

    Fix:The tool weights the first digit by 13 and the twelfth by 2.

    Mistake:Assuming hyphens are required

    Fix:They are display separators and are stripped before validation.

    Frequently asked questions

    Are these real Thai IDs, and can I use them in production?

    No. They are synthetic test values for QA and development, never for real applications, KYC checks, tax filings or identity documents; a random value can coincidentally match a real, issued number, and DevTools accepts no liability for how generated data is used.

    What is the first digit of a Thai citizen ID?

    It is the person category, from 1 to 8. A leading 0 marks a juristic person, and 9 is not a person category, so both are rejected here.

    How is the check digit computed?

    The first 12 digits are weighted 13, 12 and down to 2, and the check is (11 minus the sum mod 11) mod 10.

    Are the hyphens required?

    No. They are a display convention, and the validator strips hyphens and spaces before checking the digits.

    Where do Thai company tax numbers live?

    Company TINs start with 0 and have their own generator, because they are juristic person numbers rather than citizen IDs.