DevTools Logo

Indonesia NIK Generator

Indonesia NIK Generator

Generate 16-digit Indonesian NIK numbers with region code and encoded birth date — 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

    Male NIK

    Input
    3171011501900123
    Output
    Valid — district 317101, born 15 Jan 1990, serial 0123

    The day is 15, below the 40 offset, so the number decodes as male.

    Female NIK

    Input
    3171014501900001
    Output
    Valid — day 45 minus 40 gives 5, so 5 Jan 1990 (female), serial 0001

    The 40 offset is the only gender marker; nothing else in the number changes.

    Unknown province

    Input
    9971011501900001
    Output
    Invalid — 99 is not an Indonesian province code

    The province lookup runs before the date check, so a bad prefix is reported first.

    About this tool

    The Indonesia NIK Generator produces one 16-digit NIK (Nomor Induk Kependudukan) with a valid region code and an encoded birth date. The first six digits are the province, regency or city and district code, the next six are DDMMYY with 40 added to the day for women, and the last four are the serial number.

    There is no check digit. The validator therefore checks structure instead: the first two digits must be a known province code, the DDMMYY part must be a real date once the 40 offset is removed, and the serial cannot be 0000. That makes the NIK a useful exercise in date decoding rather than checksum math, and the failure messages say exactly which part is wrong.

    Since 2024 the NIK also serves as the NPWP for individuals. These values remain synthetic test data for QA and development: never use them on real applications, KYC checks, tax filings, or identity documents, and DevTools accepts no liability for how generated data is used. Everything runs locally in your browser.

    What this tool does not do

    • There is no check digit, so validation cannot detect a mistyped digit in a correctly shaped NIK.
    • The generator uses a short list of district codes, so outputs concentrate on six major cities.
    • Years are read as 1900 or 2000 based on the date's validity; the number itself does not state the century.
    • The validator checks province codes only, not the regency and district parts within them.

    How to use this tool

    1. Choose the NIK option

      The tool is pinned to NIK, which uses 16 digits with a region code, an encoded birth date and a 4-digit serial.

    2. Generate a value

      Click Generate to create one number with a district code, a birth date and a non-zero serial.

    3. Validate or copy

      Switch to Validate to check the province, the date and the serial, or copy the result and download it as .txt.

    Use cases

    KTP-style onboarding fixtures

    Seed Indonesian identity forms with NIKs whose region and date fields decode correctly.

    Date decoding tests

    Exercise the +40 female offset and confirm a day of 45 maps to the 5th, not an error.

    Province validation

    Pair a known province code with 99 to cover the rejection branch.

    NIK layout

    PositionsMeaning
    1-6Region: province, regency or city, district
    7-12Birth date, DDMMYY; add 40 to the day for women
    13-16Serial number, never 0000
    Check digitNone — validation is structural
    2024 noteThe NIK also serves as the NPWP for individuals

    Generated district codes include Jakarta, Bandung, Surabaya, Denpasar, Medan and Makassar.

    Common mistakes

    Mistake:Looking for a checksum

    Fix:The NIK has no check digit; structure, province and date are the only checks.

    Mistake:Reading the day literally for women

    Fix:Days above 40 mark a female record: subtract 40 before interpreting the date.

    Mistake:Assuming generated numbers are unassigned

    Fix:The structure is real, so a random NIK can coincide with an issued one; keep values in test data.

    Frequently asked questions

    Are these real Indonesian NIKs?

    No. They are synthetic values for QA and development, never for real applications, KYC checks, tax filings, or identity documents. The structure is real, so a random value can coincide with an issued NIK; DevTools accepts no liability for how generated data is used.

    Does the NIK have a check digit?

    No. Validation is structural: the province code must be known, the DDMMYY date must be real after removing the 40 female offset, and the serial cannot be 0000.

    How is gender encoded in a NIK?

    Add 40 to the day of birth for women. A day of 45 therefore means the 5th, and nothing else in the number changes.

    Is the NIK the same as the NPWP now?

    Since 2024 the NIK also serves as the NPWP for individuals; other taxpayers still use a separate 15- or 16-digit NPWP.

    Why can a mistyped digit still pass?

    Because there is no checksum, a correctly shaped NIK with one wrong digit cannot be detected. Structure checks catch the wrong length, an unknown province or an impossible date only.

    References & standards