Indonesia NIK Generator
Generate 16-digit Indonesian NIK numbers with region code and encoded birth date — synthetic test data only
For Development & Testing Purposes Only - Synthetic Mock Data
Settings
1 valueGenerates 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).
Examples
Male NIK
3171011501900123Valid — district 317101, born 15 Jan 1990, serial 0123The day is 15, below the 40 offset, so the number decodes as male.
Female NIK
3171014501900001Valid — day 45 minus 40 gives 5, so 5 Jan 1990 (female), serial 0001The 40 offset is the only gender marker; nothing else in the number changes.
Unknown province
9971011501900001Invalid — 99 is not an Indonesian province codeThe 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
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.
Generate a value
Click Generate to create one number with a district code, a birth date and a non-zero serial.
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
| Positions | Meaning |
|---|---|
| 1-6 | Region: province, regency or city, district |
| 7-12 | Birth date, DDMMYY; add 40 to the day for women |
| 13-16 | Serial number, never 0000 |
| Check digit | None — validation is structural |
| 2024 note | The 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
Related tools
Indonesia NPWP Generator
Generate synthetic Indonesian NPWP tax numbers in the 15-digit and 2024 16-digit layouts, and validate both.
VAT Number Generator
Generate VAT numbers for EU, UK, Switzerland, Norway and global tax integration testing.
Tax Number Generator
Generate valid tax identification numbers for testing (TR, US, SG, etc.)
National Identity Generator
Generate and validate national ID numbers for testing (TR, US, DE, UK, SA, AE, QA, KW, CA, ES, BR, FR, IT, NL, SE, NO, EG, SG)
Tax ID Validator
Auto-detect and validate VAT, EIN, TIN and GST identifiers with batch checksum reporting.