Write SW1A 1AA on an envelope anywhere on Earth and it will end up at Buckingham Palace. Not in the right country, not in the right city: at one building. That trick is performed by seven characters, and almost nobody who uses them daily could say what each one does.
This is the full teardown. We have taken the postcode apart segment by segment and run every claim against our database of 1,827,826 live postcodes, so alongside the how and the why you get the numbers: which formats exist and how rare each one is, which letters are banned and where, which district is the biggest in Britain and which consists of a single Hebridean island with one code to its name.
1. Why postcodes exist at all
The problem is older than the solution by about a century. In 1857 London's post was already drowning in ambiguity: the city had dozens of streets sharing the same names, and a letter addressed to King Street could plausibly go to a dozen places. Rowland Hill, the man behind the penny post, split the capital into compass districts: EC and WC in the middle, then N, NE, E, SE, S, SW, W and NW arranged around them. Two of those, NE and S, were later abolished and quietly recycled for Newcastle and Sheffield, which is why the compass around London has gaps to this day.
Numbers were added to the districts during the First World War, and here sits one of the system's best stories. With experienced sorters away at the front, their replacements could not be expected to know that a letter for Chalk Farm went in the NW3 pigeonhole. So in 1917 each district got a number, and they were handed out, after the number 1 head districts, in alphabetical order of the main sorting office, not by geography. That is why N2 is East Finchley while N17 is Tottenham, and why London postcode numbers seem shuffled on a map. They are in perfect order, just not the order anyone expects.
The postcode proper arrived because of machines. By the 1950s the Post Office wanted automated sorting, and a machine cannot be trained like an apprentice: it needs an address reduced to a short, unambiguous code. In 1959 Norwich was chosen as the guinea pig, partly because it already had modern sorting equipment, and its citizens became the first in Britain to get codes. The trial format did not survive, and Norwich was eventually re-coded to match the national scheme, meaning the first city to have postcodes was also, in 1974, the last place to get its final ones. The national rollout that finished that year produced essentially the system we still use, and it has needed remarkably little surgery since.
2. Outcode and incode: the two halves
Every postcode splits at the space. The first half is the outcode, the second the incode, and the names are pleasingly literal: the outcode routes mail out of the network toward the right delivery office, and the incode is used inside that office to reach a specific address.
Each half then splits again, giving four nested zoom levels:
| Level | Example: SW1A 1AA | How many exist | What it is |
|---|---|---|---|
| Area | SW | 125 | A whole region's post, run from one hub |
| District | SW1A | 2,982 | A town, or a slice of a city |
| Sector | SW1A 1 | 11,294 | Roughly one delivery round |
| Unit | SW1A 1AA | 1,827,826 | About 15 letterboxes, often fewer |
The averages are tidy: each area holds about 24 districts, each district about 4 sectors, each sector about 160 postcodes, and each postcode serves about 15 households. It is a funnel that narrows from the whole of Britain to a stretch of one street in four steps, which is precisely what a sorting machine, and later a satnav, needs.
3. The area: two letters that carve up a nation
The one or two opening letters name the postcode area, and they were chosen to be memorable rather than systematic: B for Birmingham, G for Glasgow, CF for Cardiff, AB for Aberdeen. Our database holds 125 of them: 121 geographic areas covering the United Kingdom, three for the Crown dependencies (IM for the Isle of Man, JE for Jersey, GY for Guernsey), plus one glorious rule-breaking relic we will meet in section 8.
Eight areas manage with a single letter: B, E, G, L, M, N, S and W, granted to Birmingham, Glasgow, Liverpool, Manchester, Sheffield and the London compass points on the grounds that they were big enough to deserve the shortest possible code. Single-letter areas punch far above their weight, carrying 217,796 postcodes across 353 districts, and the remaining 1.61 million postcodes make do with two letters.
Three letters never open a postcode: Q, V and X were banned from the first position in the 1960s as too easily misread in handwriting, and our data confirms the rule has held without a single exception across 1.8 million codes. The second letter of an area avoids I, J and Z for the same reason. The result is an alphabet with deliberate holes in it, designed a decade before anyone worried about fonts, for the failure mode of a tired human with poor handwriting.
4. The district: six formats and a London eccentricity
Add one or two digits to the area and you have the district, the workhorse of the whole system and the thing most people mean when they say "my postcode area". Britain has 2,982 of them, and they come in exactly six shapes. We counted every live postcode by format:
| Format | Example | Districts | Postcodes | Share |
|---|---|---|---|---|
| AA9 | YO8 | 946 | 723,166 | 39.6% |
| AA99 | YO23 | 1,631 | 875,679 | 47.9% |
| A9 | S8 | 68 | 46,094 | 2.5% |
| A99 | S25 | 269 | 161,961 | 8.9% |
| A9A | W1K | 16 | 9,741 | 0.5% |
| AA9A | SW1A | 51 | 11,184 | 0.6% |
The two plain formats, letters plus one or two digits, carry 99 per cent of Britain's post between them. The interesting one per cent is the pair at the bottom: districts that end in a letter, like W1K or EC2A. There are only 67 of these, and with a couple of telling exceptions every single one is in central London.
They exist because central London broke the system. The W1 and EC1 to EC4 districts contained such a density of addresses that the machinery of sectors and units below them ran out of room, so in the decades after 1917 the busiest districts were subdivided by bolting a letter onto the district itself: W1 became W1A to W1W, the City's EC codes became EC1A through EC4Y. The exceptions prove the rule about density rather than geography: E1W was carved out for Wapping, and N1C was created in the 2000s for the King's Cross redevelopment, a postcode district younger than some of the buildings in it.
District numbers hide one more trap for intuition. As in London, the number 1 usually marks a town centre, but the numbers that follow often run in alphabetical order of the old sub-offices rather than in rings on a map. Wonder why the district next door to yours has a number eleven away from your own, and the answer is usually a filing cabinet in 1934.
5. The sector: one digit, one postman's round
Cross the space and the first character of the incode is always a single digit: the sector. Britain has 11,294 of them, and a sector is the most human-scaled unit in the system, corresponding roughly to the territory one delivery round can cover. When Royal Mail plans its walks, sectors are the building blocks.
Because a sector is one digit, a district can hold at most ten, and only a handful of places max out the full set of 0 to 9. Our data finds the champions are all in one city: Liverpool, where L3, L8, L15, L22 and L37 each use all ten sector digits, a small monument to the density of Merseyside terraces.
The digits themselves are not used evenly. Sector numbering conventionally starts at 1, with 0 used tenth, once 1 to 9 are spent, so 0 is the rarest opening digit in Britain, on 160,017 postcodes. And 9 is the most common, on 206,782, partly because when Royal Mail needs a home for PO boxes and other non-geographic codes it habitually parks them in a district's highest sector. The humble digit after your space is quietly telling you whether your neighbourhood was coded early or squeezed in late.
6. The unit: the two letters that find your door
The final two letters are the unit, and they do the last and finest cut: from a delivery round down to a group of about 15 letterboxes, one side of a street, one apartment block, sometimes one single building. This is the level at which the postcode stops being geography and becomes an address.
Six letters are banned here: C, I, K, M, O and V never appear in the final two positions, again chosen as the letters most likely to be misread or misheard. Our 1.8 million postcodes contain not one violation. That leaves a 20-letter alphabet, and the frequencies show the same early-first allocation pattern as the sector digits. A is the most common final-position letter, appearing 252,638 times, with B, D and E close behind; the tail ends with W, Y and finally Z on 87,075. Alphabetically early codes were dealt out first, and many streets never needed the rest of the pack.
Put together, the most common complete incode in Britain turns out to be 9AD, carried by 841 postcodes, with 4AB, 9EA and the archetypal 1AA-style codes just behind. If your postcode ends in something like 2AA or 4AB, you share your incode with more than 800 other corners of Britain; if it ends in a Z, you are in genuinely select company.
7. The forbidden alphabet: every banned letter, and a perfect 4,000
By now a pattern has emerged: nearly every position in a postcode has letters it refuses to use, and always for the same reason. The system was designed to survive bad handwriting, smudged ink and a sorter reading aloud across a noisy room, so anywhere a letter could be mistaken for another letter or for a digit, it was simply banned. Here is the full rulebook in one place, with every rule verified against all 1.8 million live codes:
| Position | Banned | Why |
|---|---|---|
| First letter of the area | Q, V, X | Too easy to misread in handwriting |
| Second letter of the area | I, J, Z | Mistakable for 1, and for each other |
| Letter after a district number | I, L, O, Q, Z | Confusable with 1 and 0 |
| Final two letters of the unit | C, I, K, M, O, V | Misheard aloud, misread when written |
The unit ban is the strictest, and it produces this article's best number. Ban six letters and the final pair draws from an alphabet of 20, and with 10 possible sector digits the incode has exactly 10 × 20 × 20 = 4,000 possible values. We counted the distinct incodes actually in use across Britain and found precisely 4,000. Every single combination the rules permit is live somewhere. The incode space is completely full, not one theoretical code sitting unused, which for a scheme drawn up in the 1960s is an almost indecently perfect piece of capacity planning.
The rarest of the 4,000 is 3ZY, carried by just 15 postcodes in the whole country, and the Z-heavy codes cluster at the bottom of the table generally, the dusty end of the pack that only the largest districts ever reached. Meet someone whose postcode ends 3ZY and you have met roughly one in 120,000 of Britain's addresses.
8. The problems it solved, and the ones it accidentally created
The postcode was built to solve exactly one problem: letting a machine sort mail. It solved it so well that everybody else moved in. When the geography of Britain needed a common index, here was a free one, already memorised by the entire population, already printed on every envelope, narrowing the country to 15 households at a stroke.
So the sat nav asks for a postcode because seven characters beat typing an address. The insurer prices your premium by postcode because claims data clusters beautifully at sector and unit level. Lenders, retailers, pollsters, ambulance planners and estate agents all borrowed the same grid. The census publishes to it. The NHS runs on it. A code designed for envelopes became, more or less by accident, the co-ordinate system of British life, and it is a strange kind of compliment that the phrase "postcode lottery" exists: the sorting code works so well as a proxy for place that we now use it to complain about everything that varies by place.
The accidental problems are real, though. Postcodes follow delivery routes, not human geography, so they cheerfully ignore county lines and town identities, putting parts of one county under another's post town to the lasting fury of residents. They were never designed to be precise map references: a rural unit can cover miles, which is why "the postcode took me to a field" is a national genre of delivery-driver anecdote. And because so many services price by postcode, the lines drawn for 1970s mail vans now nudge insurance bills and house values, a job no one ever asked them to do.
It is worth being clear about what a postcode is not, because half of Britain's postcode arguments come from the confusion. A post town is not a town boundary: it is the delivery office that serves you, which may sit in a place you feel no loyalty to whatsoever. A postcode county is not an administrative county, which is why an address can read Essex while paying its council tax to a London borough. And a postcode boundary is not a legal line of any kind: Royal Mail can and does redraw them for operational reasons, occasionally re-homing entire villages on paper while not a single brick moves.
9. Records, ghosts and the one postcode that breaks every rule
Run the anatomy across the whole database and the outliers are a delight.
The biggest district in Britain is CR0, Croydon, with 2,790 live postcodes, ahead of SL6 Maidenhead on 2,338 and N1 in London on 2,299. Croydon's bulk is a historical accident: it was coded as one vast district and simply never split. It is also the most famous member of Britain's most exclusive numeric club, the districts numbered zero. Only seven exist: CR0, HA0 in Wembley, SS0 in Westcliff-on-Sea, CM0 around Burnham-on-Crouch, BL0 in Ramsbottom, SL0 in Iver and a tiny PR0 in Preston. Most were coded 0 because their sorting office's district 1 to 9 slots were already spoken for, leaving zero as the only number on the shelf.
The smallest districts hold exactly one postcode each. Two of them are entire Hebridean islands: PH43 is the Isle of Rum, PH44 the Isle of Canna, each an island with one postcode covering every household on it. The others are ghosts: BS98 in Bristol, famous as the home of TV Licensing, and BN91, L68 and L80, non-geographic codes built for organisations that receive mail by the sackload. These districts exist on no map, have no residents, and deliver perfectly.
The most famous codes cluster in one district. SW1A, a 148-postcode sliver of Westminster, contains Buckingham Palace at SW1A 1AA, 10 Downing Street at SW1A 2AA and the House of Commons at SW1A 0AA. The BBC holds W1A 1AA, a code so recognisable it became the title of a sitcom. And every December, Royal Mail operates its one seasonal postcode: letters to Santa go to the reindeer-registration XM4 5HQ, X being available precisely because no real postcode may start with it.
And one postcode breaks every rule at once: GIR 0AA. Allocated in 1959 to the National Girobank in Bootle, it predates the standard format and was simply allowed to persist: a three-letter outcode with no digits, containing a forbidden I, matching none of the six district formats. It sits in our database as the single member of its own format class, the coelacanth of the postcode system, still swimming happily half a century after its design went extinct.
10. How to read your own postcode
Here is the whole system at work on the most famous code of all:
| Segment | SW1A 1AA | What the machine learns |
|---|---|---|
| Area | SW | South west London's mail hub, one of the 1857 compass points |
| District | SW1A | Westminster, dense enough to need a trailing letter |
| Sector | 1 | The first-coded round in the district |
| Unit | AA | The very first unit of the pack, allotted to a certain palace |
Now take your own code and read it like the machine does. The letters before the digits name your area and its historic sorting hub. The digit or two after them is your district; a 1 suggests the old town centre, a high number a later addition or an alphabetical accident, a trailing letter means you live somewhere dense enough to have broken the original system. The digit after the space is your sector, one delivery round wide, and a 9 hints at late coding or PO boxes nearby. The final two letters walk the last yards to your street, and if they include a Z you hold a genuinely uncommon code.
Seven characters, four zoom levels, one funnel from a whole country to your letterbox, designed in the age of the mail sack and still precise enough to steer a delivery rider's phone. Nobody set out to build Britain's universal location system. They set out to help a sorting machine read envelopes, and did it so well we now describe the country in its language.
How we worked it out
Every figure above comes from our own database of 1,827,826 live UK postcodes: format censuses, letter and digit frequencies, district sizes and the forbidden-letter checks were computed across the full set, and historical background follows the standard accounts of the 1857 London districts, the 1959 Norwich trial and the 1974 completion of national coding. Counts reflect live codes, so totals will drift gently as Royal Mail adds and retires postcodes. Explore your own anatomy lesson at any district page, starting with the champion, CR0, or look up any code with the district lookup.



