nullcipher

French NIR (numéro de sécurité sociale)

Sex, year, month, place of birth and order number, plus the key 97 − (NIR mod 97). Masked after a context word. Below: the exact rule, a live check, why it matters, and what to do if one already leaked.

Live check: French NIR (social security number)

What an AI chat would receive after masking

NIR [NIR_1]

1 × French NIR (social security number) found and masked.

How the number is built and checked

The NIR is 13 digits: sex (1), year of birth (2), month of birth (2), place of birth (5) and an order number (3) that tells apart people born in the same place in the same period. A two-digit key completes it, which is why the card shows 15. [1]

The sex digit is 1 for men and 2 for women; the month is 01–12, with other codes when the month is not known. The place is the department and the commune; Corsica has been 2A and 2B since 1976, overseas departments use three digits and two, and people born abroad have 99 followed by a country code. [2]

The key is 97 minus the remainder of the 13-digit number divided by 97. INSEE's own example: 1510246102043 mod 97 = 72, so the key is 25. For Corsica the letter is read as 0 and 1,000,000 (2A) or 2,000,000 (2B) is subtracted first — in effect 2A counts as 19 and 2B as 18. [2]

Only 1 in 97 random numbers get the key right, but a 15-digit run in a log is common, so nullcipher still waits for NIR, sécurité sociale, numéro INSEE or social security number within 40 characters. INSEE's schema does not list the codes it uses when the month is unknown, so nullcipher accepts the whole range 20–99 for them; as the first digit it accepts only 1 and 2, the values the schema documents.

How nullcipher recognises it

Sex digit 1 or 2, year, month (01–12, or 20–99: INSEE assigns other codes when the month of birth is unknown, and the whole range is accepted rather than miss one), five-character place of birth (Corsica 2A or 2B allowed), three-digit order number and the two-digit key 97 − (first 13 digits mod 97), with 2A and 2B counted as 19 and 18. Spaces between the groups are allowed (1 84 12 76 451 089 46). Masked with a context word — NIR, numéro de sécurité sociale, sécurité sociale, numéro INSEE, social security number — within 40 characters before it.

This is the rule text of the “French NIR (social security number)” detector in the masking engine, copied from the engine when this page was built. Detectors run in a fixed order and, where two overlap, the earlier one wins.

Example (fake)

NIR 1 51 02 46 102 043 25

nullcipher replaces it with [NIR_1]. This is the example in INSEE's published NIR schema (1510246102043, key 25), spaced the way it appears on a carte Vitale.

Why it matters in an AI chat

The Assurance Maladie calls it the 15 digits that stay with you all your life. Employers, doctors, pharmacies and every social-security body use it.

It spells out sex, year and month of birth and the place of birth, so an unmasked NIR next to a masked name still says a great deal about who it is.

Masked, the AI sees [NIR_1] and can still help with the form, the payslip or the reimbursement question.

If it already leaked

  1. Keep every piece of evidence: screenshots of suspicious accounts and messages, letters, statements. [4]
  2. File a complaint (porter plainte) at a police station or gendarmerie, or write to the public prosecutor, and keep copies. [4]
  3. Tell your bank at once if banking details were involved and block the cards; ask the Banque de France whether credit or accounts were opened in your name (the FCC, FICP and FICOBA files). [4]
  4. For help with the steps, call Info Escroqueries on 0 805 805 817, or France Victimes on 116 006 for free victim support. [4]
  5. If it only went into an AI chat and there is no sign of misuse, delete the conversation — how, for each major assistant, is on the page listing every type. The number itself stays the same, so the steps above are about noticing and blocking misuse, not about replacing it.

Sources

  1. Numéro d'inscription au répertoire (NIR) — definition, INSEE — checked 2026-09-23.
  2. Identifiant d'individus : NIR — INSEE XML schema documentation (composition, key, Corsica rule, example) — checked 2026-09-23.
  3. Le numéro de sécurité sociale — ameli.fr (Assurance Maladie) — checked 2026-09-23.
  4. Usurpation d'identité : que faire ? — Cybermalveillance.gouv.fr — checked 2026-09-23.

Open the full masking tool to mask a whole log, .env file or e-mail — every type at once — and restore the values in the AI's answer. Or see all 30 secret types and how to delete a chat you already sent.