How Do Postcodes Work? Turning an Address Into a Sorting Instruction
By the BrainSnail editorial team. How these articles are written and checked, and how to tell us when one is wrong.
A postcode is not really a location. It is an instruction about how a piece of mail should be routed and who should carry it the last few hundred metres, which is why postcode areas follow delivery convenience rather than any administrative boundary, why they change when volumes change, and why using them as a proxy for neighbourhood produces subtly wrong answers in ways that matter.
Why they were introduced
Sorting mail by reading full addresses is slow and requires clerks who know the geography, and the volume of post grew faster than the supply of such people. The first systems were coarse: London was divided into lettered districts in 1857, and several countries introduced district numbers for large cities in the following decades. Germany introduced a national numeric system in 1941, the United States introduced the five-digit zone improvement plan code in 1963, and the United Kingdom rolled out its alphanumeric postcode nationally between 1959 and 1974. The driver in each case was mechanisation: a machine can read a short code far more reliably than a handwritten address, and once the code is read the item can be routed automatically. The finer the code, the further into the delivery chain automation can reach, which is why later systems are more precise than earlier ones and why several countries have extended their codes since introduction.
How the codes are built
The structures differ and the logic is similar, moving from coarse to fine as the code is read:
- •The British format has an outward code identifying the area and district, such as the letters for a postal town followed by a district number, and an inward code of a digit plus two letters identifying a sector and then a unit, with the unit typically covering around fifteen addresses, which makes it among the most precise national systems
- •The American five-digit code identifies a delivery area, with the optional four-digit extension narrowing it to a block or building, and the leading digit indicating a broad region of the country
- •Most European systems use four or five digits allocated broadly west to east or by region, with finer detail carried by the street address
- •The Netherlands uses four digits plus two letters, which identifies a street side within a block precisely enough that a house number alone completes the address
- •Several countries, including Ireland until 2015, managed without national postcodes entirely, relying on townland names and local knowledge
- •Some systems encode the sorting office rather than the destination, so codes for one town can belong to a neighbouring town's postal area, which is why postcode boundaries so often cross county lines
The other uses and the problems
Postcodes turned out to be so convenient as a short geographic label that they escaped the postal system entirely. They are used to set insurance premiums, to allocate school places and health services, to target advertising, to validate credit card transactions, to calculate delivery charges and, through geodemographic classification, to assign whole marketing profiles to households. Each of these uses inherits assumptions that the postal system never made. Postcodes are not areas but collections of delivery points, so a unit may consist of addresses along a street with other addresses interleaved, and drawing a polygon around them is an approximation. They change, with new ones created for new developments and old ones retired, which breaks time series. They vary enormously in the number of people they contain, so treating them as comparable units biases any per-postcode statistic. And the phrase postcode lottery exists because using them to allocate services makes an administrative artefact into a determinant of what people receive.
What is replacing them
Addressing systems are being rebuilt where postcodes do not work well. Large parts of the world have no formal street addressing at all, which obstructs deliveries, emergency response, banking and voter registration, and several approaches have emerged. Coordinate-based encodings compress a latitude and longitude into a short string, with open standards including plus codes generating a code from any point on earth without needing a database. Proprietary systems assign memorable word combinations to fixed squares, which are easy to say aloud and depend on a company's database remaining available. Several countries have built national address databases as public infrastructure, with India, Rwanda and others rolling out digital addressing schemes. The unresolved questions are governance rather than technology: whether an addressing system is a public utility or a private product, who may use it freely, and what happens to the millions of addresses encoded in a scheme if the organisation maintaining it changes its terms.
Reading one code, character by character
Decoding one British postcode shows how the parts nest. In SW1A 1AA, the postcode of Buckingham Palace, SW is the postcode area, named for the south-western part of London, and SW1A is the district, the extra letter having been added because some central London districts were too busy for a single number. The inward code 1AA begins with 1, the sector within that district, and the final two letters identify the unit, normally a small group of delivery points but here a single address. Organisations that receive a great deal of mail can be given a postcode entirely of their own.
Some details of the format exist purely to help machines and people read it reliably. The two final letters of a British postcode never include C, I, K, M, O or V, because in handwriting those are too easily confused with digits or with other letters, and a misread character sends mail to the wrong street. Some postcodes are not tied to a real delivery area at all: Canada Post gives letters addressed to Santa Claus the code H0H 0H0, and the Royal Mail has a festive code of its own, so that children's letters can be sorted automatically along with everything else and answered.
What happens to a letter in the sorting centre
When a letter enters a modern sorting centre, a machine photographs the envelope and optical character recognition software tries to read the address and find the postcode. If it succeeds, the machine prints a pattern of fluorescent marks onto the envelope, a barcode encoding where the letter is going, and from then on every machine that handles it reads the barcode rather than the handwriting. If the software cannot read the address, the image is sent to a person at a screen, sometimes in another building or city, who keys in the code within seconds, and the letter is tagged so that the answer can be matched to it later.
The final step is the one that precise codes made possible. Sorting machines can put letters not just into the right postal round but into the exact order in which the carrier will walk it, house by house, a process known as walk sequencing. That is why the precision of the code matters so much: a British unit postcode combined with a house number identifies a single delivery point, so the machine knows where in the round each letter belongs. The carrier who once spent the early morning sorting letters by hand into a frame of pigeonholes can now collect bundles that are already arranged in walking order.
How other countries did it
The United States introduced its ZIP codes in 1963, the letters standing for Zone Improvement Plan. The basic code has five digits, the first indicating a broad group of states and the following digits narrowing to a sorting centre and then a local post office area, and a later extension added four more digits to identify a smaller segment such as a street or building.
Ireland took a very different approach when it introduced Eircode in 2015, one of the last countries in Europe to adopt a postcode. Each code has seven characters, and the second part identifies an individual address uniquely rather than a group of houses, which helps in rural areas where many homes share the same address. The choice reflects how postcodes are now used for deliveries, navigation and emergency services.
The takeaway
A postcode encodes a sorting and delivery instruction rather than a place, which is why its boundaries follow postal convenience and frequently cross administrative lines. Systems moved from coarse city districts to national codes as mechanised sorting arrived, with the British alphanumeric format narrowing to about fifteen addresses and the Dutch format identifying one side of a street. Because postcodes are sets of delivery points rather than areas, vary greatly in population and change over time, using them as neighbourhood units introduces real error.