France INSEE / NIR Generator
Generate and format valid French INSEE / NIR (Social Security Number) for QA and development.
Waiting for generation...
About France INSEE / NIR Number
The Numéro INSEE (officially Numéro d'Inscription au Répertoire - NIR) is the national identity and social security number issued by INSEE and used by the French Sécurité Sociale.
It consists of 15 characters: 1 digit for gender (1=Male, 2=Female), 2 for birth year, 2 for month, 2 for department (including 2A for Corse-du-Sud and 2B for Haute-Corse), 3 for commune, 3 for registration order, and 2 control key digits calculated via Modulo 97.
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.
Frequently Asked Questions (FAQ)
How is the 2-digit NIR control key calculated?
The key is computed as Key = 97 - (Value13 % 97). For Corsica departments, 2A is converted to 19 and 2B to 18 for Modulo 97 calculation.
Are the generated numbers real?
No. All numbers are fictitious and synthesized according to official mathematical standards strictly for development, testing, and QA.