Skip to main content
FastCalc

Numéro d'inscription au répertoire (numéro de sécurité sociale)

France · Individuals

0 00 00 00 000 000 00

Paste or type the number — punctuation is optional.

What this check does — and what it cannot do

This tool checks the number's structure and its check digit, using the published algorithm for that document. A number that passes is well formed: it is arithmetically consistent and could have been issued.

It cannot tell you whether the number was actually issued, whether it is active, or who it belongs to. Only the issuing tax authority can confirm that, through its own lookup service. Treat a passing result as "worth submitting", never as proof of identity.

Calculated in your browser. Nothing you enter is sent anywhere.

The two-digit key missed nothing in half a million deliberate errors

The French social security key is 97 minus the number modulo 97. Because 97 is prime and the key has two digits rather than one, it is far stronger than a single check digit: testing 468,000 single-digit corruptions and 43,319 adjacent transpositions produced not one that slipped through.

How it works

  • Checks the final two digits against the thirteen that precede them.
  • Handles Corsica, where the department is lettered 2A or 2B rather than numeric.
  • Decodes the recorded sex, the birth month and the department of birth.
key = 97 − (the 13-digit number mod 97)

1 sex · 2-3 year · 4-5 month · 6-7 department · 8-10 commune · 11-13 serial
Corsica: 2A is read as 19 and 2B as 18 before the division

Worked example

Why two digits beat one.

  1. a one-digit checksum has ten possible values, so a random error passes one time in ten
  2. a two-digit key modulo 97 has 97, so a random error passes about one time in 97
  3. 97 being prime means no digit position can be silently cancelled
  4. measured: 0 undetected in 468,000 single-digit changes
  5. measured: 0 undetected in 43,319 swaps of neighbouring digits

A key that behaves the way a checksum should. The cost is two characters instead of one, which on a fifteen-character number is a bargain.

Reading the result

  • The number encodes sex, birth year, birth month and place of birth in plain sight. That makes it sensitive personal data, and France restricts its use accordingly — it is not a general-purpose customer reference and should not be collected as one.
  • Corsica is the awkward case. Its departments are written 2A and 2B, which are not numbers, so the specification substitutes 19 and 18 before dividing. A validator that does not know this rejects every Corsican.
  • A department of 99 means born abroad, with the following digits identifying the country rather than a commune. A number that decodes to department 99 is not malformed.
  • No generator is offered. This identifies a person and gives their date and place of birth, so a well-formed one is exactly what a fraudulent application needs.

Common questions

Where do I find my French social security number?
It is printed on your carte Vitale and on the attestation de droits you can download from your health insurance account, such as ameli.fr. It has 15 characters: 13 that identify you and a 2-digit key at the end. It is not the same as your numéro fiscal, the separate 13-digit tax number shown on your tax notices.
How is the NIR key calculated?
Take the first 13 digits as one number, divide by 97 and subtract the remainder from 97. For 1 84 12 75 116 001 that gives 26, the key on the example number. For people born in Corsica, department 2A is replaced with 19 and 2B with 18 before dividing, and this tool does that automatically.
Why does my NIR fail validation?
Check that you entered 15 characters, the 13-character number plus the 2-digit key; spaces, dots and dashes are ignored. This tool accepts numbers starting with 1 or 2 only. If the format is right, it shows the key it expected, and a mismatch almost always means one digit was misread. A department of 99, meaning born abroad, is normal and not an error.