The House With No Number: Designing UK Address Forms for Real Places
Photo: Evelyn Simak , CC BY-SA 2.0, via Wikimedia Commons
There's a particular kind of confidence that comes from shipping a postcode lookup field. You type SW1A 1AA, a dropdown appears, the user picks a house, done. It demos beautifully. Then someone orders something to Flat 3, above the bakery, where the postcode resolves to a single commercial premises, and the whole thing falls over in a way that makes the courier's app show a red box.
British addresses are not a data format. They're a centuries-old accretion of habit, and any form that pretends otherwise is going to spend its life arguing with customers.
The eighty per cent that lookup solves
Royal Mail's Postcode Address File is genuinely good at what it does: roughly 30 million delivery points, updated constantly, keyed by postcode. If you can afford the licence, it will handle the majority of urban residential addresses better than any free-text form ever will.
But the PAF is a delivery point database, not a description of where people live. Those aren't the same thing, and the gap is where the support tickets come from.
What the lookup won't tell you
A few things worth internalising before you build:
- It's licensed, and the licence is not trivial. Budgets get forgotten, renewals lapse, and suddenly the dropdown is empty on a Tuesday.
- New builds lag. Your customer has the keys; the PAF has a gap.
- It has no idea about flats within a building unless they're separately registered delivery points, which many aren't.
- It won't help with BFPO, most Crown Dependencies edge cases, or a lot of what arrives from overseas.
So the lookup is a shortcut, never a gate. Manual entry must always be one click away, and it must not be hidden behind a link that only appears on failure.
Flats, wings and letters that aren't numbers
Most address schemas are shaped by a US assumption: a street number, a street name, an optional apartment. Britain laughs at this. A perfectly ordinary address might read:
Flat 3B, Marlborough House, 12–14 Station Road
Is 3B the flat number or part of the building name? Both, depending on who you ask. Add in Flat 3b, Flat B3, 3/2 (still common in Scotland), Maisonette 2, Rear of 41, and Unit 4, The Old Tannery, and you begin to see why a single house_number integer column is a small act of violence.
Give people room. Three free-text address lines, each long enough for a genuinely long building name, beats a clever structured schema almost every time.
The house with a name and no number
Rural addressing is where urban-shaped forms embarrass themselves. In large parts of Norfolk, Cumbria, the Borders and Wales, the address is a name and a postcode and not much else:
Ty Newydd, Llanfair, Llanybydder
No street. No number. Possibly no town in the sense your form means. There may not even be a road name the mapping people agree on. What there is, reliably, is a postcode covering perhaps a dozen properties and a postman who knows exactly which one you mean.
If your form insists on a street name, those customers either invent one or abandon the basket. Neither is a good outcome.
Crown Dependencies, BFPO and other edges
Three sets of addresses that break naive UK assumptions:
- Isle of Man, Jersey and Guernsey use
IM,JEandGYpostcodes. They are not part of the UK, they're often not in your PAF-driven lookup, and they frequently don't require a county. If your validator rejectsJE2 3XXyou've just turned away a customer with a valid card and a valid address. - BFPO numbers route mail to service personnel overseas. They look like
BF1 3AAwith an accompanying number, and they're a real category you either support explicitly or honest-to-goodness cannot serve. - Northern Ireland sits on a different addressing authority and has its own quirks. Don't assume a
BTpostcode behaves like the rest.
Being explicit about what you don't ship to is fine. Silently failing validation on a legitimate address is not.
A schema with room to breathe
Here's a shape that survives contact with reality:
{
"line1": "Flat 3B, Marlborough House",
"line2": "12-14 Station Road",
"line3": null,
"town": "Bristol",
"county": null,
"postcode": "BS1 4DJ",
"country": "GB",
"uprn": 123456789012
}
Two things to notice. First, county is nullable and not required — Royal Mail hasn't required a county in an address for decades, as long as the post town and postcode are correct. Keep it for the people who want it, drop the asterisk. Second, there's no house_number and no street field. They sound helpful and they are, in fact, the source of half your data-quality problems.
If you need structured output for a specific downstream system — a courier API, say — derive it at the boundary, not in the form.
UPRN: what the identifier is actually for
The Unique Property Reference Number is a twelve-digit identifier maintained by GeoPlace, one per addressable premises, stable across years. It's available through Ordnance Survey's AddressBase products and increasingly through council datasets.
A UPRN is excellent for matching, deduplication and routing. It is worthless as a thing to show a human, and it doesn't solve address capture on its own — it identifies a property, not the flat within it, unless that flat has its own record. Keep it as an optional field you populate when lookup succeeds. Don't make it a requirement, and never display it raw to a customer.
Validation that doesn't argue with people
Some practical rules, learned the tedious way:
- Accept the postcode in any case and with or without the space. Normalise to the canonical
BS14DJ→BS1 4DJform at the point of storage. - Use a permissive pattern. The usual UK regex is fine, but make sure it isn't quietly excluding
IM,JE,GYorBF. - Never validate that the postcode exists in your lookup as a hard gate. People move into houses before databases know about them.
- Don't reject an address because the town name doesn't match the postcode. Post towns and administrative boundaries disagree constantly.
- Always offer manual entry, and say so up front rather than after a failed lookup.
- Wire up the HTML autocomplete tokens:
address-line1,address-line2,postal-code,address-level2for town. It takes ten minutes and saves a lot of thumb-typing.
Ship for the address you have
The through-line here is a familiar one. A form is a model of the world, and models fail at the edges. The flat above the shop, the farm with a name, the parcel going to a base in Cyprus — these aren't unusual cases, they're just unusual to the person who wrote the schema.
Build the form to bend. Your courier integration can be as rigid as it likes later.