French Social Security Number Key Calculator (France NIR)
Calculate the key of a French social security number (France NIR: 97 − number mod 97), check all 15 digits, Corsica 2A/2B, and decode it.
How the key of a French social security number (France) works
In France, the key of a social security number (NIR) is 97 minus the remainder of the first 13 digits divided by 97, so it ranges from 01 to 97. For Corsica, the letters A and B are replaced by 0 and 1,000,000 (2A) or 2,000,000 (2B) is subtracted before dividing. A wrong key almost always reveals a typing error.
Structure of the NIR
The French INSEE register number has 13 characters: sex (1 male, 2 female), last two digits of the birth year, birth month (01 to 12), birthplace in 5 digits, then a 3-digit order number. The 2-digit key is added at the end.
- Born in mainland France: 2-digit department and 3-digit municipality.
- Born in an overseas department: 3-digit department (971, 972…) and 2-digit municipality.
- Born abroad: 99 followed by the INSEE country code (352 for Algeria, 350 for Morocco…).
Recalculated examples
- INSEE example: a man born in December 2021 in Coulommiers, 1 21 12 77 131 232. 1211277131232 mod 97 = 47, key = 97 − 47 = 50.
- Corse-du-Sud: 2 91 01 2A 004 123 becomes 2910102004123, minus 1,000,000 = 2910101004123; remainder 61, key 36.
- Born in Algeria: 1 75 03 99 352 012, remainder 44, key 53.
Limits
- A correct key proves the number is consistent, not that it belongs to someone.
- The year does not show the century. Codes 91 to 95 are Île-de-France departments since 1968, but also Algeria (91 to 94) or Morocco (95) for births before independence; the tool shows both readings.
- Months outside 01 to 12 are assigned when the date is unknown; the tool flags them without interpreting them.
- Temporary numbers (NIA, NTT) are not covered.
Sources and dates: INSEE, individual identifier: NIR (key formula and 2A/2B rule, 2A/2B numbering since 1976); INSEE, Courrier des statistiques no. 8 (2022) (Coulommiers example); Service-public.fr, what the social security number means (codes 99 and 91 to 96, checked 14/09/2026); Decree no. 82-103 of 22 January 1982 on the register (checked on 15/10/2026).
Frequently Asked Questions
How do I calculate the key of a French social security number?
Take the first 13 digits, divide them by 97 and subtract the remainder from 97. For 1 21 12 77 131 232, the remainder is 47 and the key is 50. The result always ranges from 01 to 97.
How is the key calculated for someone born in Corsica (2A or 2B)?
INSEE replaces the letter with 0, then subtracts 1,000,000 for 2A or 2,000,000 for 2B before dividing by 97. This is the same as reading 2A as 19 and 2B as 18. People born in Corsica before 1976 have code 20, which is calculated normally.
What does 99 mean in a French social security number?
Code 99 in place of the department means a birth abroad; the next 3 digits are the INSEE country code (352 Algeria, 350 Morocco, 351 Tunisia, 109 Germany). For births in Algeria, Morocco or Tunisia before independence, codes 91 to 96 may replace 99.
Does a correct key prove the number exists?
No. The key catches a single mistyped digit or a common transposition, but a consistent number may never have been issued. Only the French health insurance (Assurance maladie) or INSEE can confirm that a person is registered.
Is this tool really free?
Yes, all tools on Kristools are 100% free and accessible without registration.
Is my data protected?
Yes. All processing is performed directly and securely inside your browser. No personal data is sent to our servers.