Royal Mail Address Formatting: How to Lay Out a UK Address Correctly
Addressing · August 2026 · 7 min read
The Royal Mail "Clear Addressing" conventions — line order, the post town in capitals, why the county is optional, and how to model UK addresses in a database.
Most UK address bugs are not validation failures. They are layout failures: the right data in the wrong order, or a field that does not exist in this country.
The canonical layout
Royal Mail's Address Management Guide sets out a clear order. Not every line is present in every address, but when a line is present it goes here:
Ms Alice Fraser <- addressee
Northgate Digital Ltd <- organisation
Flat 4 <- sub-building
Victoria House <- building name
12 High Street <- building number + thoroughfare
Didsbury <- dependent locality
MANCHESTER <- post town, in capitals
Greater Manchester <- county (optional)
M20 8DP <- postcode, on its own line
UNITED KINGDOM <- country, international mail only
Three rules matter more than the rest:
1. The post town is written in capitals. It is the single most important line for sorting after the postcode. 2. The postcode goes last, on its own line, in capitals, with one space before the inward code. 3. The county is optional. Royal Mail removed the requirement in 1996. A correct post town and postcode are sufficient.
Post town is not "city"
This trips up almost every developer coming from a US-shaped schema. The post town is a Royal Mail routing label, not a local-authority boundary. Consequences:
- A post town can differ from the town people say they live in. Addresses in Hove use the post town HOVE, not BRIGHTON, even though the two are one city.
- Post towns are reused. NEWPORT exists in Wales (NP), Shropshire (TF10) and the Isle of Wight (PO30). BANGOR exists in Gwynedd (LL57) and County Down (BT19/BT20). Only the postcode disambiguates them.
- Some post towns are longer than the city name — the city of Kingston upon Hull has the post town HULL — and some are hyphenated, such as STOKE-ON-TRENT.
If your schema has a "city" column, that is fine, but populate it with the post town and do not attempt to derive it from council data.
Buildings without numbers
A significant minority of UK properties have a name and no number: "Rose Cottage, Church Lane". Many address forms require a numeric house number and simply cannot accept these addresses. Model it properly:
CREATE TABLE addresses (
id BIGSERIAL PRIMARY KEY,
organisation VARCHAR(160),
sub_building VARCHAR(60), -- 'Flat 4', 'Unit 7'
building_name VARCHAR(120), -- 'Rose Cottage'
building_number VARCHAR(12), -- '12', '12A', nullable
thoroughfare VARCHAR(120), -- 'High Street'
locality VARCHAR(120), -- 'Didsbury'
post_town VARCHAR(60) NOT NULL,
county VARCHAR(60),
postcode VARCHAR(8) NOT NULL,
country VARCHAR(20) NOT NULL DEFAULT 'England'
);
Note that building_number is a string, not an integer. Numbers like 12A, 221B and 1/2 (common in Scottish tenement addresses) are all real.
The county question
There is no single UK county system, which is why "county" is a much weaker field than developers expect:
- England has ceremonial counties (Greater Manchester, West Midlands, Merseyside) alongside a patchwork of unitary authorities.
- Scotland has 32 council areas and no ceremonial counties in the English sense. City of Edinburgh and Glasgow City are council areas.
- Wales has 22 principal areas and eight preserved counties retained for ceremonial use.
- Northern Ireland has 11 districts for local government, but addresses commonly still use the six traditional counties: Antrim, Armagh, Down, Fermanagh, Londonderry and Tyrone.
Make the field optional, never validate a postcode against a county, and never make it a required dropdown.
Line breaks and punctuation
Royal Mail asks for no punctuation at the end of address lines: no commas, no full stops. Left-align every line, and use the same font size throughout. For screen display, a comma-separated single line is perfectly normal — 12 High Street, Didsbury, Manchester, M20 8DP — but for anything printed on a label, use the line layout above.
Practical form design
- Lead with the postcode and a lookup button. UK users expect it and it removes most typing errors.
- Always offer a manual "enter address" fallback for new-build, BFPO and unusual addresses.
- Do not require a house number.
- Do not require a county.
- Accept lower-case input and normalise it yourself.
- Allow at least two address lines before the locality, and do not cap them at 30 characters.
You can pressure-test all of this with generated data from the UK address generator, which emits the Royal Mail layout directly, or read the postcode format guide for the validation side.
More guides
- How to Check if a UK Address Is Real (and What “Valid” Actually Means)
- UK Bank Account Numbers: How Many Digits, How to Read One, and How to Check It
- The National Insurance Number Format Explained, with a Validator
- The NHS Number Format and Check Digit Explained
- UK Company Registration Numbers: Format and Prefixes Explained
- What Is a Post Town? How to Find Yours, and Why It Isn’t Always Your Town
- The UK Driving Licence Number Format Explained
- How Address Verification Software Works: PAF, UPRNs, Match Levels and What to Ask a Vendor
- Data Masking, Anonymisation and Pseudonymisation Under UK GDPR: What Each One Actually Means
- Validating UK Phone Numbers: Formats, Ofcom Ranges and the Mistakes Every Regex Makes
- Mocking a UK Address Lookup API in Your Tests
- Testing KYC and Identity Verification Flows Without Real Identities
- Test Data Management: Production Copies, Masked Data and Synthetic Data
- UK Sort Codes, Account Numbers, IBANs and SWIFT Codes for Test Data
- The UK VAT Number Format Explained, with a Check-Digit Validator
- The UK Postcode Format Explained: Areas, Districts, Sectors and Units
- How UK Address Generators Work — and How to Tell a Good One
- Using Real Customer Data in Test Environments: The UK GDPR Problem
- Why Your Address Form Rejects Perfectly Valid UK Addresses
- The UK Telephone Numbering Plan, and the Numbers Reserved for Fiction
- Validating UK Postcodes in JavaScript, Python and SQL
- Where UK Address Data Comes From: PAF, ONSPD, OS Open Names and AddressBase
- Why Faker's UK Postcodes Fail Validation