Preparing your workspace
Jobbit
Guides11 min read

UK Postcodes Explained: 5 Reasons Checkouts Reject Real Addresses

UK postcodes explained for website owners: how the 1.8 million codes are built, the valid formats forms reject, what lookup costs and how to fix your checkout.

UK Postcodes Explained: 5 Reasons Checkouts Reject Real Addresses
Read in:

A UK postcode has two halves: the outward code, which names an area and a district such as PO1, and the inward code, which narrows it to a sector and a unit such as 1AF. About 1.8 million live postcodes cover 32.4 million delivery points, and a valid one has five to seven characters in six patterns. Checkout forms reject real addresses because they test one pattern, demand a house number, or look up a file that does not yet hold a new home.

If you have ever had a customer email to say "your site says my postcode is wrong", you have met the problem from the other side. Baymard's long-running research puts the average online cart abandonment rate at 70% across 50 studies, with 17% of shoppers who abandon blaming a long or complicated checkout, and the average checkout still asks for 11 form fields when about 8 would do. A rejected postcode is the sharpest version of that friction: the customer knows they are right, the form says they are wrong, and there is nobody to argue with. UK postcodes explained properly, the fix turns out to be a few rules and one decision about lookup.

Below: how the code is built and why it looks the way it does, the odd but valid formats, where the data comes from and what it costs, the five ways forms reject real people, and the eight rules the government's own design system uses for an address form that works.

Need a shop or booking page whose checkout gets addresses right first time? Describe it to a Jobbit agent, with 100 free credits a day and no card.

How we judged

  1. Royal Mail's own documentation. The Postcode Address File programmers' guide and the monthly PAF statistics, which are the source of truth for every lookup service.
  2. The law of the format, as Royal Mail publishes it, not as a regular expression someone pasted into a forum.
  3. Prices read on 24 October 2026 from the licence and lookup providers' pages.
  4. Checkout evidence from Baymard's usability research and the GOV.UK Design System, which has tested address forms on millions of users.
  5. No invented edge cases. Every example postcode in this guide is a published one.

How a postcode is built

Take PO1 1AF, Royal Mail's own worked example.

PartExampleWhat it namesHow many exist
AreaPOOne or two letters, usually from the main town (PO is Portsmouth)124
DistrictPO1Area plus one or two digits, sometimes a trailing letter in London (W1A, EC1A)About 2,980
SectorPO1 1District plus the first digit of the inward codeAbout 11,160
UnitPO1 1AFSector plus two letters: a street, part of a street or a single large building1,810,763 live in August 2026

The outward code (PO1) is the half Royal Mail uses to route mail to the right delivery office. The inward code (1AF) is the half the local office uses to sort it to the walk. A unit postcode covers, on average, 15 delivery points, with a minimum of one and a maximum of 99. Royal Mail's August 2026 statistics list 32,429,019 delivery points and about 1,500 post towns.

The system started as an experiment in Norwich, announced in July 1959, and national coding was completed in 1974. That history is why the areas are letters from town names rather than a tidy numbering scheme, and why London's districts have the extra letters: they were squeezed into a map that had already been drawn.

The 9 valid formats that forms reject

Royal Mail publishes six letter-and-digit shapes for the outward code plus the fixed shape of the inward code. Written with the space, they look like this:

PatternExampleWhere you see it
A9 9AAM1 1AAManchester, Birmingham, Glasgow city centres
A99 9AAM60 1NWLarge single-letter areas
AA9 9AACR2 6XHMost of the country
AA99 9AADN55 1PTDistricts above 9
A9A 9AAW1P 1BBCentral London only
AA9A 9AAEC1A 1BBCentral London only
Non-geographicSA99 1AA (the DVLA), XM4 5HQ (Royal Mail's Santa address)Large organisations with their own codes
Crown dependenciesJE, GY and IM codesJersey, Guernsey and the Isle of Man are on PAF but are not in the UK
Historic and specialGIR 0AA (Girobank), BF1 (British Forces)GIR 0AA is not on PAF at all; BFPO addresses live in a separate file

Four rules catch most hand-written validators out. The first letter of a postcode is never Q, V or X, except that the non-geographic XM and XX codes do start with X. The second letter is never I or Z. The inward code's two final letters never use C, I, K, M, O or V, which is why "W1A 0AX" is valid and "W1A 0AC" cannot be. And the whole thing is at most seven characters without the space, eight with it, so a field capped at seven characters rejects every London address that is written properly.

Northern Ireland is one area, BT, and a surprising number of forms built around Great Britain patterns reject it outright.

Where the data comes from and what it costs

Every address lookup you have ever used is reading the Postcode Address File, PAF, which Royal Mail licenses. Its direct end-user licence rose on 1 October 2026 to £115 a year for a single user, £8,210 a year for use on a website and £25,000 for an organisation-wide licence, and microbusinesses with fewer than nine staff and under £2 million turnover can get PAF free for one year to develop addressing solutions. Almost nobody buys that directly. Instead you rent it through a lookup service by the search:

ServicePrice per lookup, October 2026Notes
Ideal Postcodes4.5p at 200 credits for £9, down to 2.8p at £900Credits last 12 months; typing is free, a credit is spent only when a full address is returned; 50 free to try
Loqate (GBG)7.3p on a £50 top-up, down to 4.2p at £1,000 for capture; 8.8p to 5.0p for verification45-day trial
FetchifyFrom 1p a lookup on plans from £45 a year, per its own page; third-party listings quote about 5pSources disagree, check the live page

For a shop taking 200 orders a month, that is £6 to £15 a month for a lookup on every order, which is the cheapest abandoned-basket fix on the market. The free alternatives are useful but different: postcodes.io, the ONS Postcode Directory and Ordnance Survey's Code-Point Open give you every postcode with its coordinates and local authority, which is perfect for delivery zones and maps, but none of them contains a street address or a house number. They cannot fill in a form.

The 5 ways forms reject real people

  1. The pattern test is too tight. A regex written for AA9 9AA rejects M1 1AA, W1A 0AX and EC1A 1BB, which are the centres of the three biggest cities. The GOV.UK Design System's advice is the opposite of strict: accept the postcode with or without the space, in any case, strip anything that is not a letter or digit, and only then check it.
  2. The house number is compulsory. Named cottages, flats above shops, farms and most of rural Britain have no number. "Address line 1" must accept a name, and the GOV.UK pattern makes the number optional.
  3. The address is newer than the file. Royal Mail keeps new properties in a separate "Not Yet Built" file until they are occupiable and receiving mail, so a customer in a new-build estate can have a valid postcode that a PAF lookup does not know. Address-data firms such as Autoaddress and Data-8 put the churn at roughly 26,000 new postcodes and 100,000 new homes a year. Always offer a manual entry after a failed lookup.
  4. The flats are hidden. PAF can hold a single building-level record such as "Flats 1 to 10" for a converted house; the individual flats are in Royal Mail's Multiple Residence product, which not every lookup service includes. The customer picks the building and then has nowhere to type "Flat 3".
  5. The county field. Royal Mail dropped counties from the address format years ago and the GOV.UK Design System says plainly that a county is not part of a correct address. A compulsory county drop-down forces people to guess, and the guess is wrong for a third of the country.

PO Boxes are a sixth, quieter case: they are on PAF as large-user addresses, but a validator that insists on a street name rejects them.

8 rules for an address form that works

  1. Postcode first, then lookup. Ask for the postcode, show the matching addresses, let the customer pick one. Baymard recommends automatic lookup because it removes the fields people mistype.
  2. Always a manual route. A visible "enter the address manually" link for new builds, missing flats and anyone abroad.
  3. Accept, then tidy. Upper-case it, insert the space before the last three characters, remove stray characters. Never reject for formatting.
  4. Optional house number, two free address lines, no county. The GOV.UK pattern; Baymard also recommends hiding address line 2 behind a link.
  5. Validate against the real list, not a pattern. A lookup tells you the address exists. A regex only tells you it looks plausible.
  6. Northern Ireland, the Crown dependencies and BFPO are decisions, not errors. Decide whether you deliver there and say so before the form, not after.
  7. Store what the customer chose. Keep the PAF address and the customer's own wording; the lookup is for delivery, their wording is for the label.
  8. Watch the rejections. Log every postcode the form refused. A list of real customers you turned away is the best bug report you will ever get.

How an AI agent helps

Building this by hand means a developer, a licence decision and a week. Describing it to an agent is a paragraph.

  • Builds the form with lookup wired in. Tell the agent which lookup service you chose and it writes the checkout with postcode-first lookup, the manual fallback and the GOV.UK field rules. Jobbit's generate feature turns the description into a working page you can host on your own domain.
  • Writes the validation properly. Royal Mail's published rules, the London formats, BT, the X exceptions, instead of a regex from a forum.
  • Decides the delivery map. It uses the free postcode datasets to draw your delivery zones by sector or district and prices them.
  • Reads the rejection log. Weekly, it lists the addresses the form refused, groups them by cause and proposes the fix.
  • Tests with real edge cases. It runs W1A 0AX, EC1A 1BB, BT1 and a named cottage through the form before your customers do.
  • Keeps the lookup bill honest. It watches credit use and tells you when the next price band would be cheaper.

ChatGPT, Claude, Gemini, Microsoft Copilot, Manus and Meta's Muse will all explain the postcode format if you ask. What they do not do is build the checkout, host it and hand it to a human developer from the network when the shop platform needs a custom plugin. That end-to-end job is what Jobbit is for.

Fix your checkout this week

  • Day 1: test your own form with M1 1AA, EC1A 1BB, W1A 0AX, BT1 5GS and an address with no house number. Count the rejections.
  • Day 2: choose a lookup service and claim the free credits; 50 at Ideal Postcodes, a 45-day trial at Loqate.
  • Day 3: rewrite the fields to the GOV.UK pattern: postcode first, optional number, two lines, no county, manual fallback.
  • Day 4: switch on rejection logging.
  • Day 7: read the log and fix the first cause. Then hand the weekly reading to the agent.

Read next

Frequently asked questions

What do the parts of a UK postcode mean?

The outward code, before the space, is the area (one or two letters) and the district (one or two digits, with a letter in central London). The inward code, after the space, is the sector (one digit) and the unit (two letters). PO1 1AF is area PO, district PO1, sector PO1 1 and unit PO1 1AF, which covers on average about 15 addresses.

How many postcodes are there in the UK?

Royal Mail's August 2026 statistics list 1,810,763 live postcodes covering 32,429,019 delivery points, across 124 postcode areas and about 1,500 post towns. The file changes every day as homes are built and businesses move, so a lookup service refreshed monthly can still be behind.

Why does a website say my postcode is invalid when it is correct?

Usually because the form tests for one pattern and your postcode uses another, such as the central London formats W1A 0AX or EC1A 1BB, or because your home is new and not yet in the Postcode Address File, or because the form insists on a house number or a county. The fix is on the website's side: a proper lookup, a manual fallback and the GOV.UK field rules.

Is UK postcode data free?

The postcodes themselves, with coordinates and local authority, are free through postcodes.io, the ONS Postcode Directory and Ordnance Survey's Code-Point Open. Full street addresses are not: they come from Royal Mail's Postcode Address File, licensed at £115 a year for a single user or £8,210 for website use from 1 October 2026, or rented by the lookup at about 3p to 7p each.

What is the longest UK postcode?

Seven characters without the space, eight with it, in the AA9A 9AA or AA99 9AA patterns such as EC1A 1BB or DN55 1PT. The shortest is five characters, such as M1 1AA. A field capped at seven characters rejects every correctly spaced London address.

Can an AI agent fix my checkout form?

Yes, if you can describe what goes wrong. A Jobbit agent builds or rewrites the address form with postcode lookup, a manual fallback and the GOV.UK rules, hosts the page on your domain, and brings in a developer from the network when the shop platform needs code. It starts with 100 free credits a day and no card.

Related guides