A comprehensive outline of UK postcode patterns, its constituent components and how they can be utilised. Split a postcode into outward code, inward code, postcode area, district code, sub-district code, postcode sector and postcode unit.
Updated 11 Jan 2021
The UK postcode consists of five to seven alphanumeric characters which was created by Royal Mail. A full postcode designates an area with multiple addresses or a single delivery point.
UK postcodes can assume one of the following patterns:
Postcode Format | Outward Code | Inward Code | Postcode Area | District Code | Sub-District | Sector | Unit |
---|---|---|---|---|---|---|---|
AA9A 9AA |
AA9A |
9AA |
AA |
AA9 |
AA9A |
AA9A 9 |
AA |
A9A 9AA |
A9A |
9AA |
A |
A9 |
A9A |
A9A 9 |
AA |
A9 9AA |
A9 |
9AA |
A |
A9 |
N/A | A9 9 |
AA |
A99 9AA |
A99 |
9AA |
A |
A99 |
N/A | A99 9 |
AA |
AA9 9AA |
AA9 |
9AA |
AA |
AA9 |
N/A | AA9 9 |
AA |
AA99 9AA |
AA99 |
9AA |
AA |
AA99 |
N/A | AA99 9 |
AA |
N/A means not applicable
Postcodes can also be broken down into meaningful constituent components.
The outward code is the first half of a postcode (before the space). Some are non-geographic, i.e. does not divulge the location.
Distinguishing features include:
Examples of outward codes include:
L1
W1A
RH1
RH10
SE1P
CSV Download full list of UK outward codes.
The inward code is the second half of a postcode (before the space). The inward code assists in the delivery of post within a postal district.
Its distinguishing features are:
Examples of inward codes:
0NY
7GZ
7HF
8JQ
CSV Download full list of UK inward codes.
The postcode area is the longest initial string of letters in a postcode.
Examples include:
L
(Liverpool)EH
(Edinburgh)BT
(Northern Ireland)Check our list of postcode areas for reference.
CSV Download full list of UK postcode areas.
The district code is part of the outward code. It is between two and four characters long. It does not include the trailing letter found in some outcodes.
Examples of district codes include:
L1
W1
RH1
RH10
SE1
CSV Download full list of UK postcode districts.
The sub-district code is part of the outward code. It is often not present, only existing in particularly high density London districts. It is between three and four characters long. It does include the trailing letter omitted from the district.
Examples of Sub-District codes:
W1A
EC1A
NW1W
E1W
SE1P
CSV Download full list of UK postcode sub-districts.
The postcode sector is made up of the postcode district, the single space, and the first character of the inward code. It is between four and six characters long (including the single space).
Examples of postcode sectors:
SW1W 0
PO16 7
GU16 7
L1 8
CV1 4
CSV Download full list of UK postcode sectors.
The postcode unit is the last two letters of a postcode.
Each postcode unit generally represents:
The level of discrimination is often based on the amount of mail received by the premises or business.
Examples of postcode units:
NY
(from SW1W 0NY
)GZ
(from PO16 7GZ
)HF
(from GU16 7HF
)JQ
(from L1 8JQ
)CSV Download full list of UK postcode units.
We publish an open sourced library called Postcode. This package allows you to extract parts of a postcode outlined above.
Try it below: