
The UK postal code system is a complex but efficient way to deliver mail and packages across the country. It's a unique combination of letters and numbers that helps postal workers quickly identify where to send your mail.
The system was introduced in 1959 to replace the earlier postal sorting system, which relied on town and city names. This change greatly improved the speed and accuracy of mail delivery.
A typical UK postal code consists of two parts: the outward code and the inward code. The outward code identifies the local delivery office, while the inward code identifies the specific area within that office's delivery zone.
For another approach, see: Us Postal Service Tracking Delivery Confirmation
What is a UK Postal Code?
A UK postal code is a crucial part of the mail delivery system in the UK.
It helps sort mail either manually by staff or automatically by machines, making it a reliable delivery system.
Letters are first sorted according to the Outward Code and then further sorted according to the Inward Code.
The postcode is usually fixed by adding the correct code according to the post town name written on the envelope or package if it's incomplete.
UK postcodes come in three types: unique, post office box, and standard.
Unique postcodes are assigned to a single address, business, or organization.
Post office box codes are for PO Boxes.
The rest of the postcodes are considered standard for regular addresses.
Postcodes are not only used for delivering mail but also for determining geographical zones.
Components of a UK Postal Code
A UK postal code is made up of two alphanumeric codes that show the post town and a small group of addresses or a single major delivery point. The first code, known as the outward code or outcode, has between two and four characters.
The outward code indicates the postcode area and district, and consists of one or two letters, followed by one digit, two digits, or one digit and one letter. It's a crucial part of routing mail to the right post office.

Here's a breakdown of the components of a UK postal code:
The inward code, also known as the incode, always has three characters and starts with a number, denoting a sector within the district, and ends with two letters, denoting delivery points.
Structure
A UK postal code is made up of two alphanumeric codes that show the post town and a small group of addresses. The first code, the outward code, has between two and four characters and indicates the postcode area and district.
The outward code consists of one or two letters, followed by one digit, two digits, or one digit and one letter. It's like a unique identifier for a specific area. For example, "PO15" is a valid outward code.
The second code, the inward code, always has three characters and indicates the postcode sector and delivery point. It starts with a number, denoting a sector within the district, and ends with two letters, denoting delivery points. The inward code is like a more specific address within the post town.

Here's a breakdown of the postcode structure:
The inward code is used to route mail to the correct delivery point within a post town. It's like a GPS for mail carriers. For example, "PO15 5RR" is a valid postcode that indicates a specific delivery point within the PO15 post town.
In summary, a UK postal code is made up of two codes that work together to identify a specific address. The outward code indicates the post town and district, while the inward code indicates the delivery point within that district.
Unit
A unit postcode is a crucial part of a UK postal code, and it's worth understanding what it represents. It's typically two characters added to the end of the postcode sector.
A unit postcode often represents a street, part of a street, a single address, a group of properties, a single property, a sub-section of the property, an individual organisation, or a subsection of the organisation. The level of discrimination is often based on the amount of mail received by the premises or business.
Unit postcodes can be either large user postcodes or small user postcodes. Large user postcodes are allocated to single addresses receiving at least 500 mail items per day, such as business addresses. Small user postcodes, on the other hand, are collections of usually adjacent addresses.
A single small user postcode may contain up to 100 addresses, but 15 is a more typical number. Large buildings with many separate delivery points can have more than one unit postcode within the building.
In the UK, a unit postcode is part of the overall postcode structure, which consists of six letters. The first three letters are the outward code, which helps route mail to the right post office. The second part of the postcode is called the inward code, which gives each regional authority a unique code to choose from.
Linked to Multiple Geographies
The Office for National Statistics (ONS Geography) maintains and publishes a series of postcode products that link all current and terminated UK postcodes to a range of administrative, health, statistical and other geographies.
These postcode products use the Code-Point Open grid reference, allowing for a variety of UK geographies to be linked to postcodes.
The postcodes are alphanumeric and variable in length, ranging from six to eight characters, including a space.
Examples of postcodes include "SW1W 0NY", "PO16 7GZ", "GU16 7HF", and "L1 8JQ".
Download Table Structure
The UK postal code is structured in a hierarchical manner, supporting four levels of geographic unit. This structure is essential for efficient mail delivery and routing.
At the top level, we have the Postcode Area, which is designated by a unique prefix, such as PO. There are only 124 Postcode Areas in the UK.
The Postcode District is the second level, and it's identified by adding a number to the Postcode Area prefix. For example, PO15 is a Postcode District with approximately 3,118 locations.
Moving down the hierarchy, we have the Postcode Sector, which is represented by adding another number to the Postcode District. PO15 5 is a Postcode Sector with around 12,463 locations.
At the bottom level, we have the Unit Postcode, which is the most specific and detailed level of the hierarchy. This is represented by adding a unique suffix to the Postcode Sector, such as PO15 5RR.
Understanding UK Postal Codes
A UK postal code, also known as a postcode, is a unique code that helps sort and deliver mail efficiently. It's usually between 6 and 8 characters long and can include both letters and numbers.
The outward code is the part of the postcode before the space in the middle and is between two and four characters long. It's not always clear where mail is to be sent, and some postcodes are non-geographic. Examples of outward codes include "L1", "W1A", and "RH1".
To validate a postcode, you can use a table of all 1.7 million postcodes in Code-Point Open. The full delivery address including postcode can also be validated against the Royal Mail Postcode Address File (PAF), which lists 29 million valid delivery addresses.
Here are some common formats for UK postcodes:
A regular expression for validating UK postcodes is specified in the British Standards document BS 7666.
Validation
Validation is a crucial step in ensuring your postcode is correct and valid. The format of a UK postcode can be validated against a table of all 1.7 million postcodes in Code-Point Open.
To extract the first part of a postcode, simply ignore the last three characters, as they will always be 9AA. This makes it easy to identify the start of a postcode.
Areas with single-digit districts include BL, BR, FY, HA, HD, HG, HR, HS, HX, JE, LD, SM, SR, WC, WN, and ZE. WC is always subdivided by a further letter, such as WC1A.
Some areas have double-digit districts, like AB, LL, and SO. AB, for instance, was originally divided into five districts (AB1-AB5) and later expanded to include a second digit, resulting in districts like AB10-AB16.
In certain areas, a district '0' (zero) is used, such as BL, BS, CM, CR, FY, HA, PR, SL, and SS. BS is the only area to have both a district 0 and a district 10.
The letters Q, V, and X are not used in the first position of a postcode. Similarly, the letters I, J, and Z are not used in the second position.
In specific cases, like London postcode districts E1, N1, W1, and parts of E1, N1, NW1, and SE1, a single-digit district has been further divided by inserting a letter after the digit and before the space.
Here are the letters that can appear in the third position of a postcode, depending on the structure:
- A, B, C, D, E, F, G, H, J, K, P, S, T, U, and W when the structure starts with A9A.
- A, B, E, H, M, N, P, R, V, W, X, and Y when the structure starts with AA9A.
Finally, the final two letters of a postcode do not use C, I, K, M, O, or V, to avoid resembling digits or each other when hand-written.
Address File
The Postcode Address File (PAF) is a database of UK postal addresses and postcodes maintained by Royal Mail's Address Management Unit.
The PAF is updated daily and is commercially licensable for a fee regulated by Ofcom.
You can find individual postcodes or postal addresses using Royal Mail's Postcode and Address Finder website, but be aware that this is limited to 50 free searches per user per day.
The PAF includes map references of postcodes, which allows you to pinpoint a postcode area on a map.
A fresh viewpoint: Canada Address Example with Postal Code
ONS Directory and Statistics
The Office for National Statistics produces postcode directories, under similar licence terms to the OS product. These directories include Northern Ireland postcodes with centroid coordinates in the OSI grid, a difference from the OSGB grid used in other parts of the UK.
The ONS Postcode Directory and National Statistics Postcode Lookup contain all the necessary information, including non-current postcodes and dates of introduction and withdrawal of postcodes.
A notable difference between ONS and OS directories is that Northern Ireland postcodes are subject to a more restrictive licence, permitting internal business use only.
A Little History and Math
The UK's postcode system has a fascinating history. Formalized in the late 1950s, postcodes in their current format are relatively new to the UK.
Postcodes can include both letters and numbers, which allows for a staggering 2,176,782,336 possible combinations. This is a far cry from the US, where zip codes are limited to just numbers and only offer 1,000,000 possible combinations.
London postcodes, however, have a longer history dating back to the early 1900s. This makes them some of the oldest postcodes in the UK.
How Post Codes Work
UK postcodes are a reliable delivery system that helps sort mail into the correct delivery bag and then to the proper post office.
Letters are first sorted according to the Outward Code and then further sorted according to the Inward Code.
Mail is routed via various modes of transportation, including mailing vehicles, planes, and trains, before being delivered by the mailman to the corresponding address.
If a postcode is incomplete, it's usually fixed by adding the correct code according to the post town name written on the envelope or package.
UK postcodes come in three types: unique, post office box, and standard.
Unique postcodes are assigned to a single address, business, or organization.
Post office box codes are specifically for PO Boxes.
The rest of the postcodes are considered standard for regular addresses.
Postcodes are not only used for delivering mail, but also for determining geographical zones and demographic profiling.
4 Answers
If you're trying to understand UK postal codes, you're not alone. Many people struggle to work with them, especially when they're in a format without spaces.
Some UK postal codes have a specific format, such as LLNA_NLL, but it's not always correct. Thankfully, there are newer versions of the format available, like LLNA NLL.
For your interest: Ups Tracking Numbers Format
If you're working with R, you might be wondering how to add spaces to UK postcodes. One user asked how to do this, and the answer is to use a function or code that can insert spaces into the postcode string.
You can also use a simple string manipulation to add spaces to UK postcodes. For example, you can use the strsplit function in R to split the postcode string and then paste it back together with spaces.
Here are some examples of UK postcodes with and without spaces:
- LL15 2BQ
- LL15 2BQ
- SW1A 0AA
- EC1A 1BB
Keep in mind that some postcodes might not be in the correct format, so make sure to double-check them before using them.
How to Determine a Place's Location
To determine a place's location in the UK, use the Find a Postcode tool of Royal Mail, which automatically displays a selection of postcodes when you enter a part of the address.
The more details you provide about the address, the more specific the results will be, making it easy to find the address of big or small businesses, organizations, or landmarks.
A different take: Find Postal Code Canada Post
Make sure to double-check the spelling and abbreviations like St., Rd., and Ave. as incorrect information can lead to an inability to find the location.
The most populated postcode area is B (Birmingham), with a population of 1,904,658, which is a significant factor in understanding the UK mailing system.
Knowing the postcode of a location is crucial as it's often required to complete a delivery, and postcodes provide several benefits, including quick location finding during emergencies and efficient mail delivery.
Frequently Asked Questions
What is a 5 digit zip code UK?
In the UK, a 5-digit postal code is not a standard format, but rather a 5-7 digit alphanumeric code is used, such as EC3N 4AB for London.
What is a 5 digit zip code UK postcode?
A 5-digit UK postcode is not typically used, but rather a 5-7 digit alphanumeric code, such as EC3N 4AB, which includes both numbers and letters. This is equivalent to a zip code in the US, but with a unique UK postal code format.
What is a valid address in the UK?
A valid UK address includes a premise identifier, street details, post town, and postcode, all in uppercase and correctly formatted. For example, "123 Main St, LONDON, SW1A 0AA
Sources
- https://en.wikipedia.org/wiki/Postcodes_in_the_United_Kingdom
- https://www.loveandasuitcase.com/posts/interesting-facts-why-the-uk-does-postcodes-right-aka-how-uk-zip-codes-work
- https://www.ons.gov.uk/methodology/geography/ukgeographies/postalgeography
- https://stackoverflow.com/questions/46692277/blank-space-in-uk-postal-code
- https://winterville.co.uk/uk-postcode/
Featured Images: pexels.com