Indonesian NIK / KTP Generator
Generate and format valid Indonesian Nomor Induk Kependudukan (NIK) numbers for software QA.
Waiting for generation...
About the Indonesian NIK
The NIK (Nomor Induk Kependudukan) is the 16-digit national identity number found on the Indonesian KTP identity card.
It encodes geographic regional codes (6 digits), birth date (6 digits, with +40 on the day for females), and a 4-digit serial number.
Anatomy & Structure of NIK (Nomor Induk Kependudukan)
The Indonesian NIK consists of 16 digits structured in 4 parts:
| Position | Field | Length | Meaning & Rule | Example |
|---|---|---|---|---|
| 1 & 2 | Province Code | 2 digits | Official BPS province code (11 to 94, e.g., 31 = DKI Jakarta) | 31 |
| 3 to 6 | Regency & District | 4 digits | Kabupaten/Kota (pos 3-4) and Kecamatan code (pos 5-6) | 7101 |
| 7 to 12 | Date of Birth | 6 digits | Format DDMMYY; Females have day increased by 40 (days 41 to 71) | 470390 |
| 13 to 16 | Unique Sequential | 4 digits | Sequential number issued by Dukcapil (0001 to 9999) | 0001 |
Official NIK Validation Rules (Law No. 24/2013)
Structural validation and decoding of Indonesian NIK:
Province validation (01-94) + Date DDMMYY (Female: day - 40)
- 1. Verify exact length of 16 decimal digits.
- 2. Validate province code (positions 1 and 2).
- 3. Extract date: if day > 40, subtract 40 (gender female); otherwise gender male.
- 4. Validate date consistency for day (1-31), month (1-12), and year.
Frequently Asked Questions
How is female gender encoded in Indonesian NIK numbers?
By adding 40 to the birth day (resulting in 41 to 71 for women).
Are these numbers officially registered in Indonesia?
No, they are synthetically generated for testing purposes.