Skip to main content

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:

PositionFieldLengthMeaning & RuleExample
1Gender1 digit1 for male; 2 for female1
2 & 3Birth Year2 digitsLast two digits of birth year85
4 & 5Birth Month2 digitsMonth of birth (01 to 12)12
6 & 7Department2 charsDepartment code (01-95, 2A/2B Corsica, 97/98 overseas, 99 abroad)75
8 to 10Commune Code3 digitsINSEE municipality code108
11 to 13Birth Act Order3 digitsSequential birth certificate number in that month/commune042
14 & 15Control Key2 digitsModulo 97 checksum digits51

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. 1. Extract the first 13 characters of the NIR.
  2. 2. If the department is 2A (South Corsica), replace "2A" with numeric "19".
  3. 3. If the department is 2B (Upper Corsica), replace "2B" with numeric "18".
  4. 4. Compute integer remainder modulo 97: Remainder = BaseValue13 % 97.
  5. 5. Subtract remainder from 97: Key = 97 - Remainder.
  6. 6. Pad with leading zero if needed and verify match against digits 14 and 15.

Frequently Asked Questions (FAQ)