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.
Processed locally in your browser/ Your data stays in your browser.
What is French Social Security Number (NIR) 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.
How does it work?
- Type or paste the 15-character number. Spaces, dots and hyphens are ignored, and the Corsican codes 2A and 2B are accepted.
- The tool divides the first 13 characters by 97 and works out the key that should follow them.
- It compares that key with the last two digits you entered and tells you whether the number is valid or which key was expected.
- Read the breakdown (sex, birth year and month, département, commune, order number) to spot a typing error, then copy the corrected number.
Common use cases
- 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.
Examples
Try this input in the tool above:
1 84 12 76 451 089 46
Full number: 1 84 12 76 451 089 46 Control key: 46 Sex: 1 (male) Birth year (2 digits): 84 Birth month: 12 (December) Département: 76 Commune: 451 Order number: 089
Privacy
French Social Security Number (NIR) Validator runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.
Limitations
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.
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 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.
Developer Tools
UUID Validator & Version Detector
Paste one or many UUIDs to see which ones are valid, which version each is and, for time-based versions, when it was created.
Developer Tools
IPv4 Address Validator
Paste one or many IPv4 addresses to see whether each is valid, why not if it is not, and what kind of address it is.
Network Tools
CSV Validator
Check that a CSV is well-formed before importing it, and get a list of problems with line numbers.
JSON & Data
JSON Validator
Check whether a piece of text is valid JSON and locate the exact character where it goes wrong.
JSON & Data
Regex Tester
Write a pattern, paste some text and see every match highlighted, with its position and capture groups.
Developer Tools