---
id: "frnir"
kind: "datatype"
status: "stable"
is_pii: true
categories: ["pii", "persons"]
country: ["FR"]
langs: ["fr"]
quality: 85
url: "http://registry.apicrafter.io/datatype/frnir"
---

# French social security number (NIR) (`frnir`)

French national identification number (numéro d'inscription au répertoire, NIR), known as the social security number. INSEE assigns it to every person born in France. It has 13 characters and a two-digit control key: sex (1 or 2; 7 or 8 for temporary registrations), year and month of birth, department and commune of birth (2A or 2B for Corsica), an order number, and the key. The key is 97 minus the 13-character number modulo 97, with 2A read as 19 and 2B as 18.

- Personal data (PII): yes
- Categories: Personally identifiable information (pii), Person related (persons)
- Countries: France (FR)
- Languages: French (fr)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^[1278]\d{4}(?:\d{2}|2[AB])\d{8}$
```

Check digit algorithm: `fr_nir`

## Examples

- `153072C07300443` (invalid example) — 2C is not a department code

## Mappings

- dpv: `pd:OfficialID`
- fta: `IDENTITY.SSN_FR`
- google_dlp: `FRANCE_NIR`
- purview: `France social security number (INSEE)`, `EU Social Security Number (SSN) or Equivalent ID`, `EU social security number or equivalent identification`
- stdnum: `fr.nir`

## Metacrafter rules

4 rules: 2 match the field name, 2 match values.

- `frnirfield` (field, `fr/fr_persons.yaml`)
- `frnirvalue` (data, `fr/fr_persons.yaml`)
- `fr_pii_frnirfield` (field, `pii/fr/fr_pii.yaml`)
- `fr_pii_frnirvalue` (data, `pii/fr/fr_pii.yaml`)

## Supported by tools

- `awsglue`
- `azureailanguage`
- `databricks`
- `dataprep`
- `fta`
- `googledlp`
- `ibmknowledgecatalog`
- `metacrafter`
- `microsoftpurview`
- `nightfall`
- `pythonstdnum`
- `snowflake`
- `talend`

## Translations

- fr: Numéro de sécurité sociale (NIR)

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/INSEE_code>
- wikipedia: <https://fr.wikipedia.org/wiki/Num%C3%A9ro_de_s%C3%A9curit%C3%A9_sociale_en_France>
- doc: <https://www.insee.fr/en/metadonnees/definition/c1409>

## Quality

Score 85/100. Missing: examples.

JSON: <http://registry.apicrafter.io/api/v1/datatypes/frnir.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/FR/persons/frnir.yaml>
