NIN generator (Senegal)
A Senegalese NIN (on the CEDEAO biometric identity card, décret n° 2016-1536) is seventeen digits — sex, region, full date of birth, a serial, and a check digit whose algorithm is not published. These test values are synthetic and format-valid.
Synthetic NIN (format-valid). The check digit’s algorithm is not published.
Format specification
| Identifier | Numéro d’Identification National (NIN) |
|---|---|
| Country | 🇸🇳 Senegal |
| Format | 00000000000000000 |
| Length | 17 characters |
| Checksum | None |
| Example | 20520030211654103 |
| Safe strategy | Synthetic |
| Data quality | Best-effort |
Numéro d’Identification National: what each part means
| 0 | Sex: 1 = male, 2 = female. |
|---|---|
| 00 | Region code of registration. |
| 00000000 | Full date of birth as YYYYMMDD. |
| 00000 | Five computer-generated serial digits. |
| 0 | Check digit (algorithm not published; test values use a random digit). Older digitised cards used a 13-character format instead. |
Validation regex
Matches the canonical value — strip separators and uppercase first: value.replace(/[^A-Za-z0-9]/g, '').toUpperCase()
^[12]\d{16}$ References
Common questions
Will these pass my validation?
Yes — they are well-formed Numéro d’Identification National values (00000000000000000) and pass standard format checks.
Could one belong to a real person?
These are synthetic values. They are format-valid but not drawn from a guaranteed reserved range, so use them only for testing.
Can I generate many at once?
Increase the count, or use the free API and CSV/JSON export for large datasets.