What a NIK encodes, and what you can check for free
31 July 2026
An Indonesian NIK is sixteen digits, and they are not arbitrary. Knowing the structure tells you what you can verify yourself and where you genuinely need official data.
The structure
18 71 11 190798 0001
│ │ │ │ └── sequence number
│ │ │ └───────── date of birth (DDMMYY, +40 to the day for women)
│ │ └──────────── district (kecamatan)
│ └─────────────── city / regency (kabupaten or kota)
└────────────────── province
Two details people miss:
- The day is offset by 40 for women. A birth day of
59means the 19th, and female. This is why a naive parser reports impossible dates. - The year is two digits, so it is ambiguous across centuries and has to be resolved against context.
What you can check for free
Because the number carries a region, a date and a gender, you can check those against what is printed on the card:
- Does the region code correspond to a real province, city and district?
- Does the encoded date of birth match the printed one?
- Does the encoded gender match?
All three are arithmetic. No database, no permission, no cost. When they agree, the number is internally coherent.
What this does not tell you
Nothing about whether the person exists. A structurally perfect NIK can be invented in a text editor. Confirming a real citizen record requires Dukcapil access, which is licensed and priced accordingly.
It also says nothing about whether the physical card is genuine.
Why it is still worth doing
It is a cheap filter that catches the common real-world failure: a typo, a transposed digit, a bad OCR read. Running it before anything expensive means you are not paying to check a number that was never valid.
Our free NIK endpoint does exactly this check, and our document reader runs it automatically on anything it reads — reported as a confidence signal, never as proof.
GlianaAI is a pay-per-call AI API: 90+ models plus Indonesian identity tools, no signup.