A Vietnamese CCCD (Căn cước công dân — Citizen Identity Card) is a 12-digit number, and unlike a random ID it is structured: the digits encode the holder’s province of registration, the century and gender, and the birth year. This decoder reads that structure and shows you the province/city, the full birth year, the gender, and the trailing serial. It is useful for understanding your own card or verifying that fields line up.
How it works
The 12 digits follow the format set out in Circular 07/2016/TT-BCA:
| Position | Meaning |
|---|---|
| 1–3 | Province / city code (mã tỉnh) |
| 4 | Gender + century code |
| 5–6 | Last two digits of the birth year |
| 7–12 | Random serial |
The 4th digit is the clever part. Its half (rounded down) gives the century: 1900 + floor(digit / 2) × 100. So 0–1 → 1900s, 2–3 → 2000s, 4–5 → 2100s. Even is male, odd is female. The decoder then adds the two-digit year (positions 5–6) to that century start.
Example
Take 001 0 99 012345:
001→ province Hà Nội- digit
0→ century1900 + floor(0/2)×100 = 1900s, and even → Male 99→ birth year1900 + 99 = 1999012345→ serial
Result: a man from Hà Nội born in 1999. The decoder reads only the documented structure of the number and never checks it against any government database — everything runs locally in your browser.