United Kingdom

    UK Postcode Format Explained

    The structure of a UK postcode: outward and inward codes, the allowed letter and digit patterns, generic valid examples and the mistakes people make.

    Updated 14 October 2026 · 3 min read

    A UK postcode is made of two parts, the outward code and the inward code, written with a single space between them. The inward code is always three characters long: one digit followed by two letters. The outward code varies in length, which is why the space always sits before the last three characters.

    The two halves

    The outward code starts with one or two letters that identify a postcode area, usually linked to a town or city, followed by one or two digits and sometimes a final letter. Together these identify a postcode district.

    The inward code starts with a digit that identifies a sector within the district. The last two letters identify the delivery unit, which is typically a street, part of a street or a single large building.

    Valid patterns

    Outward codes follow a small number of letter and digit patterns. Using A for a letter and 9 for a digit, the accepted combinations are:

    • A9 9AA
    • A99 9AA
    • A9A 9AA
    • AA9 9AA
    • AA99 9AA
    • AA9A 9AA

    These are patterns only, not real postcodes. A value such as AB1 2EF fits the AA9 9AA pattern but is shown here purely to illustrate shape.

    Rules worth knowing

    Not every letter is used in every position. For example, the final two letters of the inward code never include C, I, K, M, O or V. Any validation that only checks length will let invalid values through, while a check that is too strict can reject real postcodes, so a pattern check should be a first filter and not proof that a postcode exists.

    Northern Ireland postcodes begin with BT. The Channel Islands and the Isle of Man have their own postcodes that follow the same format but are not part of the United Kingdom itself, a distinction that can matter for customs and shipping rules.

    Common mistakes

    • Dropping or misplacing the space, for example writing the last four characters together.
    • Confusing the letter O with the digit 0, or the letter I with the digit 1.
    • Copying only the outward code, which identifies a district and not a delivery point.
    • Assuming a postcode identifies a single building. Several neighbouring properties often share one.
    • Assuming the code reflects local government boundaries, when it is built for mail sorting.

    Where UPCS fits

    A UPCS code such as GB-XXXX-XXXX (placeholder) is a different thing. It points to a 3 m x 3 m cell and is not an official postcode. It can be added next to the postcode when the exact entrance matters. See the UK overview or learn how to find a UK postcode.

    Frequently asked questions

    Does a UK postcode always have a space?

    The space is part of the standard written form and always sits before the last three characters. Many systems accept it without the space, but it is clearer and safer to include it.

    Are UK postcodes case sensitive?

    No. They are normally written in capital letters, but lower case is read the same way by lookup tools.