|This article may be expanded with text translated from the corresponding article in the French Wikipedia. (December 2008)|
The INSEE code is a numerical indexing code used by the French National Institute for Statistics and Economic Studies (INSEE) to identify various entities, including communes, départements. They are also used as national identification numbers given to people.
Created under Vichy 
||This article needs additional citations for verification. (November 2007)|
Although today this national identification number is used by the Social Security and is present on each person's social security card (carte Vitale), it was originally created under Vichy France under the guise of the Inscription Number to the National Repertory of Identification of People (Numéro d'inscription au répertoire national d'identification des personnes, NIR). The latter was originally to be used as a clandestine military recruitment tool, but at the end served to identify Jews, gypsies and other "undesirable" populations under Vichy's collaborationist conceptions. The first figure of the NIR would be 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. 9 and 0 were reserved for persons of undetermined racial status.
The Demographic Service had been 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 SNS or National Statistics Service (Service national des Statistiques).
National identification numbers 
Each French person receives at birth a national identification number, called "Social Security number", which comes from his registration to the NIR (National Repertory). This INSEE number is composed of 13 digits + a two-digit key. Although the total number is of 15 digits, the rationale behind it makes it easy for individuals to remember at least the first seven digits of it (they just have to know their sex, year and month of birth, and department of birth). Since this number is used in many administrative procedures (whether by the state or by private enterprises), most people know by memory part of this identification number.
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 départment of origin : 2 digits, or 1 digit and 1 letter in metropolitan France, 3 digits for overseas.
- ooo is the COG number (see below) of 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) or to 97 if the number is a multiple of 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. 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 non-Jewish indigenous people of Algeria (improperly called "Muslims") 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 entering into none of these class).
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, birth code is superior to 20 if month of birth is unknown, and 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 number of total births is superior to 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, take the remainder from this division, and then the "complement to 97", that is the difference between 97 and the left-over of the division): this gives the control key code.
History of the NIR 
The NIR (National Identification Repertory) was created by René Carmille (who died at the Dachau concentration camp in 1944) who realized between April and August 1941, under the Vichy regime, the first general repertory to secretly prepare the mobilization of a French army. This codification was then taken back by general Marie in Algeria, in order to recense Jews, Muslims and others categories. The aim was to file the whole of the French population and to discriminate them according ethnical or statutory criteria, in the frame of the racial policies of Vichy. Thus, the first digit which today is used to distinguish males and females then had other purposes: 3 or 4 for Algerian non-Jews 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, during the whole of the war, only "1" and "2" (for male and female) was used. The gestion of the NIR was given in 1946 to the new Statistical Institute, the INSEE. This institution is also in charged 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, reference of the Act of Birth (Acte de naissance).
SIREN and SIRET codes 
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 — they are 36 778 communes in France and many are homonyms). This code has got 5 digits :
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 license plate numbering system became optional in 2009 so the last two digits no longer necessarily indicate which department the car is registered to.
The commune codes were assigned initially by numbering the alphabetically ordered list of communes names within each department or overseas collectivity. Exceptions have occurred over time, because some commnues were renamed, or because 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; however these 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. So effectively, 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 digits INSEE codes for foreign countries and territories.
See also 
- National identification number
- National Insurance number (a similar number in the United Kingdom)
- Death Master File
- Social Insurance Number (a similar number in Canada)
- Uniform civil number (a similar number in Bulgaria)
- Personal ID Number (CURP) (Mexico) (a similar number in Mexico)
- Service number
- Tax File Number (a similar number in Australia)
- Cadastro de Pessoas Físicas (similar number in Brazil)
- NIE Number (a similar number in Spain)
- PPS number (Irish system)
- Codice Fiscale (a similar number in Italy)