Skip to content
Clear Postcode

Guides

UK postcode and address guides

Straight answers for developers and shop owners: how postcodes work, how to validate them, what PAF is and how to stop failed deliveries.

How UK postcodes workA UK postcode in four parts: area, district, sector and unit. What each part means, how many there are, why postcodes change and how to check one.UK postcode regexA tested regular expression for UK postcodes, how it works, examples in JavaScript, Python and PHP, and why a format check alone isn't enough.What is PAF, the Postcode Address File?PAF is Royal Mail's database of every UK delivery address. What's in it, how it's licensed, what a lookup costs and how it differs from open postcode data.UPRN vs UDPRNUPRN identifies a property, UDPRN identifies a Royal Mail delivery point. What each is, who issues it, where to get it and which one to store.Address validation at checkoutHow to validate UK postcodes and addresses at checkout without losing sales: the field order, the API calls, the messages to show and the mistakes to avoid.How to reduce failed deliveriesMost failed UK deliveries start with a bad address. The common errors, how to catch them at checkout and in bulk, and how postcode data helps.