France INSEE / NIR Validator
Online validator for French INSEE / NIR (Social Security) numbers according to Modulo 97 specifications.
How does INSEE / NIR validation work?
Validation checks the 15-character length, gender digit (1, 2, 3, 4, 7, 8), department format (including Corsica 2A and 2B), commune and serial codes.
It applies the official Modulo 97 checksum algorithm, converting 2A to 19 and 2B to 18 to verify the final 2-digit control key.
Anatomy & Structure of French NIR / INSEE (15 Digits)
The national social security register number (NIR) features 15 characters across 7 official blocks:
| Position | Field | Length | Meaning & Rule | Example |
|---|---|---|---|---|
| 1 | Gender | 1 digit | 1 for male; 2 for female | 1 |
| 2 & 3 | Birth Year | 2 digits | Last two digits of birth year | 85 |
| 4 & 5 | Birth Month | 2 digits | Month of birth (01 to 12) | 12 |
| 6 & 7 | Department | 2 chars | Department code (01-95, 2A/2B Corsica, 97/98 overseas, 99 abroad) | 75 |
| 8 to 10 | Commune Code | 3 digits | INSEE municipality code | 108 |
| 11 to 13 | Birth Act Order | 3 digits | Sequential birth certificate number in that month/commune | 042 |
| 14 & 15 | Control Key | 2 digits | Modulo 97 checksum digits | 51 |
NIR / INSEE Validation Algorithm (Modulo 97)
INSEE computes the 2-digit control key over the first 13 characters using Modulo 97:
Key = 97 - (BaseValue13 % 97)
- 1. Extract the first 13 characters of the NIR.
- 2. If the department is 2A (South Corsica), replace "2A" with numeric "19".
- 3. If the department is 2B (Upper Corsica), replace "2B" with numeric "18".
- 4. Compute integer remainder modulo 97: Remainder = BaseValue13 % 97.
- 5. Subtract remainder from 97: Key = 97 - Remainder.
- 6. Pad with leading zero if needed and verify match against digits 14 and 15.