# INSEE code

The INSEE code (/ɪnseɪ/ in-SAY) is a numerical indexing code used by the French National Institute for Statistics and Economic Studies (INSEE) to identify various entities, including communes and départements. They are also used as national identification numbers given to people.

## Created under Vichy

Although today this national identification number is used by social security in France and is present on each person's social security card (carte Vitale), it was originally created under Vichy France under the guise of the Registration Number to the National Directory of Identification of Physical People (Numéro d'inscription au répertoire des personnes physiques, NIRPP or simply NIR). The latter was originally to be used as a clandestine military recruitment tool, but in the end served to identify Jews, gypsies, and other "undesirable" populations under Vichy's conceptions. The first digit of the NIR was 1 for a male European, 2 for a female European, 3 for a male Muslim, 4 for a female Muslim, 5 for a male Jew, 6 for a female Jew, 7 for a male foreigner, 8 for a female foreigner, while 9 and 0 were reserved for persons of undetermined racial status.
The Demographic Service was created in 1940 in order to replace the military recruitment office prohibited by the June 1940 Armistice with Nazi Germany. On October 11, 1941, the Demographic Service absorbed the former General Statistics of France (SGF, created in 1833). The new organization was called the National Statistical Service (Service national des statistiques, SNS).

## National identification numbers

Each French person receives at birth a national identification number, the "numéro d'inscription au répertoire" (NIR or National Repertory registration), also called a "numéro de sécurité sociale" (or Social Security number). This INSEE number is composed of 13 digits + a two-digit key. Although the total number is of 15 digits, its composition makes it easy for individuals to remember at least the first seven digits (they just have to know their sex, year and month of birth, and department of birth).
Their format is as follows: syymmlloookkk cc, where
* s is 1 for a male, 2 for a female,
* yy are the last two digits of the year of birth,
* mm is the month of birth, usually 01 to 12 (but there are special values for persons whose exact date of birth is not known),
* ll is the number of the department of origin : 2 digits, or 1 digit and 1 letter in metropolitan France, 3 digits for overseas.
* ooo is the commune of origin (a department is composed of various communes) : 3 digits in metropolitan France or 2 digits for overseas.
* kkk is an order number to distinguish people being born at the same place in the same year and month. This number is the one given by the Acte de naissance, an official paper which officialize a birth (and is needed throughout life for various administrative procedures, such as getting an identity card).
* 'cc' is the "control key", 01 to 97, equal to 97-(the rest of the number modulo 97). There are exceptions for people in particular situations.
The "sex" codes (s: 1 for male, 2 for female) can be given in special occasions for temporary registrations, such as for someone who a person who works as a wage-earner but is not registered for miscellaneous reasons. The sex code can be changed if someone underwent gender reassignment. Under Vichy France, but only in Algeria (not in metropolitan France) this s code was also used to register Jews, Algerian Muslims, foreigners, or ill-defined people. Thus, 3 or 4 was given to Muslim people of Algeria and of all colonies; 5 or 6 for indigenous Jews; 7 or 8 for foreigners; 9 or 0 for miscellaneous and ill-defined status (people in none of these classes).
The part llooo is used together, referred to as the COG, which identifies the person's location of birth.
They are also specific codes for people whose date or place of birth is unknown, although this is today more and more rare (for example, the birth code is greater than 20 if the month of birth is unknown, and the communal code is 990 if the commune of origin is unknown). For overseas departments, the department number has three digits, and the communal number two digits (since 1950). People born abroad have a departmental code of 99, and the communal code is replaced by the code of the country of birth, which has three digits. Before 1964, departmental codes from 91 to 96 were used for Algeria, Tunisia and Morocco.
If in a specified month the total number of births exceeds 999, an extension common code is created.
The last code is obtained by a mathematical method (dividing by 97 the number formed by the first 13 digits, taking the remainder from this division, and then the "complement to 97", that is the difference between 97 and this remainder): this gives the control key code.

## History

The NIR (National Identification Repertory) was created by René Carmille, who died at the Dachau concentration camp in 1944. Between April and August 1941, under the Vichy regime, Carmille conducted the first general survey to prepare the secret mobilisation of a French army. The codification was then done by General Marie in Algeria, to obtain a census of Jews, Muslims and other categories. The aim was to create a file of the whole of the French population and to discriminate according to ethnic or statutory criteria, following the racial policies of Vichy. Thus, the first digit that is now used to distinguish males and females then had other purposes: 3 or 4 for Algerian non-Jewish indigenous people, 5 or 6 for indigenous Jews, 7 or 8 for foreigners, and 9 or 0 for miscellaneous and ill-defined statutes.
This discriminatory categorization used in Algeria was abolished in 1944 and has never been used in Metropolitan France where, throughout the war, only "1" and "2" (for male and female) was used. The administration of the NIR was assigned in 1946 to the new Statistical Institute, the INSEE. This institution is also in charge of the RNIPP (répertoire national d'identification des personnes physiques, National Repertory of Identification of Physical Persons), which contains for each individual: the NIR, last name, first name, sex, date and place of birth, and a reference of the Birth Registration (Acte de naissance).

## SIREN and SIRET codes

SIREN codes are given to businesses and nonprofit associations, SIRET codes to their establishments and facilities (SIRENE database).

## Geographical codes

INSEE also gives numerical indexing codes (French: les Codes INSEE) to various administrative entities in France:
* INSEE codes (known as COG, for Code officiel géographique) are given to various administrative units, notably the French communes (they do not coincide with postcodes, as there are 36,778 communes in France and many have the same name). The code has five digits:
** 2 digits (département) and 3 digits (commune) for the 96 départements of Metropolitan France.
** 3 digits (département or collectivity) and 2 digits (commune) for the overseas departments and overseas collectivities.
The departmental codes are well known since they were used as the last two digits of vehicle registration plates (75 is Paris, 13 Marseille, 31 Toulouse, etc.). However, this vehicle registration plate numbering system became optional in 2009 so the last two digits no longer necessarily indicate the department to which the car is registered.
The commune codes were assigned initially by numbering the alphabetically ordered list of commune names within each department or overseas division. Exceptions have occurred over time because some communes were renamed, some communes were split and new communes have been added to the end of the list.
The departmental codes are also best known as part of the French postal codes; but the postal codes do not include the INSEE commune numbers but were designed by geographical series starting by the main city of the department and then split geographically around them, with additional series given for special distribution. Some areas of the largest and most populated communes can also be assigned distinct series. The postal codes do not indicate precisely the communes but the location of the post office in charge for the distribution, and many rural communes share the same postal code number as the commune where the post office is located.
There are also 5-digit INSEE codes for foreign countries and territories, beginning with 99.