Guide6 min read

Is It Safe to Put Your French Social Security Number in AI?

No: never type your French social security number (NIR) into a consumer AI. The CNIL frames its use tightly. Anonymise it before you send.

By Pierre de ONYRI

The answer is no. Never hand your French social security number to a consumer AI. That number, officially the NIR (numéro d'inscription au répertoire), is a lifelong identifier. Its structure already reveals your sex, your date and place of birth. The CNIL (France's data protection authority) tightly frames how it may be used. Pasted into a consumer ChatGPT or Le Chat, it travels to a third party. It may be stored there. And it can never be changed. AI can help with your paperwork, but without this number: anonymise it before you send.

The NIR, your lifelong social security number

The social security number has an official name: the NIR. It is the numéro d'inscription au répertoire des personnes physiques. France's health insurance service, ameli.fr, calls it a unique and permanent identifier. It is assigned to you for life. It identifies you to the health insurance system and every social-protection body. Without it, no reimbursement of care is possible.

A number that talks about you

The NIR is not a randomly drawn identifier. It is what France calls a meaningful number. Its structure of thirteen digits, followed by a control key, encodes several facts. In other words, the number itself leaks personal data. Reading it already tells you about its holder.

  • Your sex (the first digit).
  • The year and month of birth.
  • The department and commune of birth.
  • An order number, then a two-digit control key.

What the CNIL says: a strictly framed use

The CNIL stresses one essential point. The use of the NIR is especially framed. It cannot serve in just any processing. Its use stays reserved for the health, social and employment sphere. A specific text, the « cadre NIR » decree, sets the authorised actors and purposes.

The CNIL also applies a reinforced minimisation. Even when a use is allowed, such as payroll or HR, it must be justified. The number is not collected for mere convenience. You must show its use is genuinely necessary.

A lifelong key you cannot change

The NIR has a fearsome trait. It is a key assigned for life. It is tied to your health and social-protection records. Unlike a password, it cannot be changed. If it leaks, you cannot revoke it. So the exposure stays a problem over time.

You assumeThe reality
“It's just a number”The CNIL frames it strictly; it can't go into just any processing
“The number reveals nothing”Its structure encodes sex, the date and the place of birth
“If it leaks, I'll change it”It's a lifelong key; it can be neither changed nor revoked
“An AI can safely see it”Pasted into an AI, it travels to a third party and may be stored
The risk isn't talking to an AI — it's the number you leave behind in the prompt.

Pasted into an AI: a disproportionate exposure

A consumer AI runs on third-party servers. Your text leaves the browser. It goes to the model's provider. There, depending on the provider's policy, it may be transmitted, stored, sometimes reviewed to improve the service. Always check the privacy policy of the service you use.

For such a tightly framed identifier, the exposure is disproportionate. The GDPR (General Data Protection Regulation) treats the NIR as personal data. The CNIL is its supervisory authority in France. Any processing needs a legal basis. It must respect the principles of purpose and minimisation. Pasting your NIR into an AI ticks none of these boxes.

Diagram: at the centre, an amber (exposed) social security number chip radiates link-lines to a health cross, an identity card and a records folder, showing all it unlocks; on the right, an anonymized chip shows only cobalt tokens, cleared by a checkmark.
After the CNIL (framed use of the NIR, GDPR) and France's health insurance service, ameli.fr, on the role and composition of the social security number.

The fix: anonymise before you send

Good news: AI stays useful for your paperwork. It can explain a reimbursement, a form, a deadline. For that, it never needs your real number. Ask your question in general terms. Keep the NIR out of the prompt.

When a concrete case demands it, anonymise first. Replace the number with a placeholder, like [NUMERO DE SECU]. The AI then reasons about your situation, without seeing the real value. You restore the number afterwards, locally.

  1. 1Spot the NIR in your text, along with the other identifiers.
  2. 2Replace it with a reversible token, in the browser.
  3. 3Send only the anonymised text to the AI.
  4. 4Restore the real value in the reply, locally.
  5. 5Keep the real number for official channels: ameli, your employer, social bodies.

That's what ONYRI Sanitize is for. The engine detects sensitive data — the NIR, contact details, amounts — and replaces it with reversible tokens before sending. Detection and the mapping stay in your browser. Only anonymised text reaches the model. The AI finds only tokens, never your real number. You get the help, without exposing a lifelong key you can never change.

Frequently asked questions

Is it safe to put your French social security number in AI?
No, better to avoid it. The French social security number, the NIR, is a lifelong identifier whose use the CNIL frames strictly. Its structure already reveals your sex and your birth. Pasted into a consumer AI, it travels to a third party and may be stored there, and it can never be changed. For a general question, AI does not need it. If a case demands it, replace it with a placeholder before you send.
Why is the NIR more sensitive than an ordinary number?
Because it talks. Its structure encodes sex, the year and month of birth, the department and commune of birth. So the number leaks personal data on its own. It is also a lifelong key, tied to your health and social-protection records, that cannot be changed if it leaks.
Can AI help with my social security paperwork without my number?
Yes. AI can explain a reimbursement, a form or a procedure in general terms. It never needs your real NIR for that. Keep the number for official channels, like ameli or your employer. For everything else, an anonymised question is enough.

Sources & references

Keep your sensitive data in your browser

ONYRI Sanitize detects and masks your sensitive data before it reaches the AI, then restores the answer — from names to API keys.

Anonymize my prompt

Read next