French Social Security Number (NIR) Validator
Paste a French social security number, the 15-character NIR printed on a carte Vitale or an attestation, and check that its two-digit control key matches the first thirteen characters. The result also breaks the number into sex, birth year, month, département and commune. Everything runs in your browser and nothing you type is stored or 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 or paste the 15-character number. Spaces, dots and hyphens are ignored, and the Corsican codes 2A and 2B are accepted.
- 2The tool divides the first 13 characters by 97 and works out the key that should follow them.
- 3It compares that key with the last two digits you entered and tells you whether the number is valid or which key was expected.
- 4Read the breakdown (sex, birth year and month, département, commune, order number) to spot a typing error, then copy the corrected number.
What is French Social Security Number Validator?
The NIR (numéro d'inscription au répertoire), usually called the numéro de sécurité sociale, is the 15-character number that identifies a person in French social security records. It starts with one digit for sex (1 or 2), followed by the birth year and the birth month on two digits each, the département of birth, the commune of birth and a three-digit order number. The last two digits are the control key.
The key is 97 minus the remainder of the first 13 digits divided by 97. A remainder of 0 gives the key 97, and a single-digit key is written with a leading zero. For people born in Corsica, the département code 2A is replaced by 19 and 2B by 18 before dividing. This check catches nearly every single mistyped digit and most swapped neighbouring digits.
When should you use it?
- You are filling in a payroll, HR or health-insurance form and want to catch a typo before you submit it.
- You are a developer testing a form or an import script with valid and invalid numbers.
- A number copied from a scan, a PDF or a photo may contain a misread digit.
- You need to know which two digits should follow a 13-character number.
What a valid key does and does not prove
A correct key only shows that the 15 characters are consistent with each other. It does not prove that the number was ever issued or who it belongs to: only the French social security bodies can confirm that. In France the use of the NIR by organisations is also regulated, so only collect it when you have a legal reason to.
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.
Nothing is uploaded. The calculation is done by JavaScript in your browser, and the number is not stored, logged or added to the page address.
Frequently Asked Questions
What is the structure of a French social security number?
It has 15 characters: 1 for sex, 2 for the birth year, 2 for the birth month, 2 for the département (2A or 2B for Corsica), 3 for the commune, 3 for the order number, then the 2-digit control key.
Why does the tool say my key is wrong?
Most often a digit was mistyped or two neighbouring digits were swapped. Compare the number with your carte Vitale or attestation. The tool shows the key it expects for the first 13 characters.
How are numbers from Corsica handled?
Type 2A or 2B in the département position. For the calculation the tool replaces 2A by 19 and 2B by 18, which is the rule used to compute the key.
Does a valid result mean the number really exists?
No. It means the format and key are consistent. The tool cannot check a database, and it cannot tell you whose number it is.
Is the number I enter sent to a server?
No. The check runs locally in your browser. The number is not stored and does not appear in the page address.
Related tools
- French Social Security Key CalculatorGet the 2-digit clé from the first 13 characters of a French social security number
- 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
- EAN-13 Check Digit CalculatorCalculate the EAN-13 check digit from 12 digits or validate a full 13-digit code