French Social Security Key Calculator (Clé NIR)
Enter the first thirteen characters of a French social security number and get the two-digit control key that completes the 15-character NIR. The page shows the calculation step by step, handles Corsica's 2A and 2B, and copies the full number in one click. Everything runs in your browser and nothing is sent.
Enter 13 characters to get the key, or 15 characters to check a full number.
Your data stays on your device.
How does it work?
- 1Type the first 13 characters: sex, birth year, birth month, département, commune and order number. Spaces are ignored and Corsica's 2A and 2B are accepted.
- 2The tool divides the number by 97 and keeps the remainder.
- 3It subtracts the remainder from 97 and adds a leading zero when the result has one digit; a remainder of 0 gives 97.
- 4Copy the key on its own or the full 15-character number.
What is French Social Security Key Calculator?
The last two digits of a French social security number (NIR) are a control key, often called the clé. It is not secret and not random: it is computed from the first 13 characters so that typing mistakes can be detected. Anyone who knows the 13 characters can work the key out, which is why this calculator needs nothing else.
The formula is key = 97 − (the 13-digit number mod 97). If the number contains 2A or 2B for a birth in Corsica, 2A is replaced by 19 and 2B by 18 for the division. The result is between 1 and 97 and is written on two digits, so 7 becomes 07.
When should you use it?
- You have a 13-character number from a form or a database and need the key that completes it.
- You are generating or checking test data for a payroll, HR or health application.
- You want to see the modulo 97 calculation worked out to understand or implement it.
- The key on a document is unreadable and you want to check what it should be.
Use the key calculator responsibly
The control key protects against typing errors, not against fraud: it says nothing about whether a number was issued. A social security number is personal data, and in France its use by organisations is regulated. Use this tool to complete or check numbers you are entitled to handle.
Privacy
This tool runs in your browser. What you type, paste or open is processed on your device by JavaScript and is not sent to our servers, stored or shared. Your data stays on your device.
The number is processed only in your browser. It is not sent to a server, stored, logged or added to the page address.
Frequently Asked Questions
How is the French social security key calculated?
The key is 97 minus the remainder of the first 13 digits divided by 97. A remainder of 0 gives 97, and a single-digit result is written with a leading zero, such as 07.
What about people born in Corsica?
Their département code is 2A or 2B. For the calculation, 2A is replaced by 19 and 2B by 18, then the usual formula is applied.
Can I find someone's key from their name or date of birth?
No. The key depends on all 13 characters, including the commune and order number, which cannot be guessed from public information. This tool only completes a number you already have.
Is the key secret?
No. It is a public check value derived from the other 13 characters and exists only to detect typing errors.
Related tools
- French Social Security Number ValidatorCheck a French NIR and its 2-digit control key, with Corsica 2A/2B, in your browser
- EAN-13 Check Digit CalculatorCalculate the EAN-13 check digit from 12 digits or validate a full 13-digit code
- EAN / GTIN ValidatorCheck the check digit of EAN-13, EAN-8, UPC-A and GTIN-14 codes, singly or in batch
- ISBN ValidatorValidate ISBN-10 and ISBN-13 numbers and convert between the two forms
- UPC ValidatorValidate UPC-A and UPC-E codes and expand a UPC-E into its full 12-digit UPC-A