moncodepostal.frHomeMap

HEXASMAL: La Poste's official postal-code database

HEXASMAL is the file published by La Poste that lists all French postal codes. It is freely available and serves as the reference for all postal and logistics services in France.

What does the file contain?

The current version has 39 084 rows, covering 35 007 communes and 6 328 distinct postal codes. Each row represents a link between a commune and a postal code. There can be multiple rows with the same commune when it has several postal codes, and conversely multiple rows with the same postal code when it covers several communes.

Stylized preview of the HEXASMAL file in CSV format, with communes and their postal codes
HEXASMALPreview of a few values in the postal code directory

The columns

Each row of the file has five main fields:

Example — the seven rows for the commune of Arles (INSEE 13004):

Example HEXASMAL rows for Arles
nom_communecode_postallibelle_acheminementligne_5
ARLES13104ARLESMAS THIBERT
ARLES13123ARLESL ALBARON
ARLES13129ARLESSALIN DE GIRAUD
ARLES13200ARLES(vide)
ARLES13200ARLESLE SAMBUC
ARLES13280ARLESMOULES
ARLES13280ARLESRAPHELE LES ARLES

The delivery label, sometimes different from the INSEE name

For 186 communes, the delivery label is different from the commune name. La Poste added this data for certain cases where there was a risk of confusion, especially for communes with short names.

A few examples:

Examples of delivery labels that differ from the INSEE name
INSEE nameLa Poste label
SEYNESEYNE LES ALPES
COLMARSCOLMARS LES ALPES
FLEURYFLEURY D AUDE
ST FIRMINST FIRMIN EN VALGODEMARD
CALLACCALLAC DE BRETAGNE
MONCONTOURMONCONTOUR DE BRETAGNE

La Poste prefers that we use this label rather than the name of the commune

Why is everything in uppercase?

Every commune name and every label is stored in unaccented ASCII uppercase in HEXASMAL — you'll see ARLES not Arles, NIMES not Nîmes, ST DENIS not Saint-Denis. This isn't a formatting quirk: it's La Poste's addressing standard.

When writing a French address, the last line (postal code + city) must be in uppercase letters, without accents, without punctuation, left-aligned. That's the convention sorting machines are trained to read.

Line 5: sub-localities

The ligne_5 field holds the name of a sub-locality inside the commune: a hamlet, a village, or a former merged commune. Out of the 39 084 rows in the file, 4 696 have one (about 12%), for 4 548 distinct sub-localities.

Take Arles, metropolitan France's largest commune: its territory is so big that La Poste split it into five postal codes, some grouping several sub-localities. This lets a letter go straight to the right sorting centre without passing through Arles's main office first.

How do you write a French address?

A standard French address has at most six lines; the fifth is precisely ligne_5 when the destination is a sub-locality:

Madame Jeanne DUPONT          ← recipient's name
Résidence Les Mimosas         ← address complement (building, residence, …) (optional)
Bâtiment B                    ← address complement (entrance, PO box, …) (optional)
12 rue des Salins             ← street number and name
SALIN DE GIRAUD               ← line 5: sub-locality (optional)
13129 ARLES                   ← postal code + La Poste label

Line 5 is optional: only use it for communes that have declared sub-localities in HEXASMAL. Without it, mail would go through the main sorting centre first (Arles here) before being routed back to Salin-de-Giraud — adding one or two days to delivery.

Where to download the file

HEXASMAL is published as open data, updated regularly by La Poste.

view on data.gouv.fr ↗
view on laposte.fr ↗

See also