Numéro de sécurité sociale (NIR) generator (France)
A French social security number (NIR) is fifteen digits: sex, year and month of birth, department and commune of birth, an order number, and a two-digit MOD-97 key. These test values are synthetic but carry a valid key.
Synthetic French NIR with a valid key; not a real INSEE number.
Format specification
| Identifier | Numéro de sécurité sociale (NIR) (NIR / INSEE) |
|---|---|
| Country | 🇫🇷 France |
| Format | A NN NN NN NNN NNN NN |
| Length | 15 characters |
| Checksum | MOD 97 |
| Example | 2 28 12 10 375 654 29 |
| Safe strategy | Synthetic |
| Data quality | Verified against sources |
Numéro de sécurité sociale (NIR): what each part means
| A | Sex: 1 for men, 2 for women (3 and 4 exist for temporary numbers). |
|---|---|
| NN | Last two digits of the year of birth. |
| NN | Month of birth, 01–12 (20+ is used when the month is unknown). |
| NN | Department of birth (01–95; 2A/2B for Corsica; 99 for people born abroad). Test values use 01–95. |
| NNN | INSEE commune code of the place of birth (or a country code when born abroad). |
| NNN | Order number in that commune’s birth register for the month. |
| NN | Control key: 97 minus the first thirteen digits modulo 97. |
Validation regex
Matches the canonical value — strip separators and uppercase first: value.replace(/[^A-Za-z0-9]/g, '').toUpperCase()
^[12]\d{14}$ References
Common questions
Will these pass my validation?
Yes — they are well-formed Numéro de sécurité sociale (NIR) values (A NN NN NN NNN NNN NN) and pass standard format checks, including the MOD 97 checksum.
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.