UK postcodes are a hierarchical system of alphanumeric codes originally designed to aid the automated sorting and delivery of mail. There great advantage as a geographical referencing code is that they are widely used and therefore frequently collected in survey results and administrative records. Developed in the 1960s, there are four levels in the hierarchy such that the postcode "SO17 1BJ" can be broken down as follows:
|Area type||Code||Name||No. of areas|
|Postal district||SO17||(Not named)||2,700|
|Postal sector||SO17 1||(Not named)||9,000|
|Unit postcode||SO17 1BJ||(Not named)||1.7 millions|
"SO17 1BJ" is a full unit postcode. These typically relate to around 15 residential addresses or one large user, such as a business address receiving more than 25 items of mail per day. SO17 1BJ is actually the postcode of the University of Southampton. Some unit postcodes are non-geographic, in the sense that they relate to Post Office boxes where mail is retained for collection rather than to actual locations. SO171BJ (no spaces) and SO17 1BJ (one space in fifth position) are both entirely acceptable ways of recording this postcode. The postcode CF5 1NX could correctly be written with one or two spaces. Postcodes should only be recorded in 7 or 8-character formats with the first part, known as the outcode, left justified and the second part, known as the incode, right justified leaving spaces in the middle as necessary. Postcode-processing software varies in the sophistication with which it can handle variations in format, but if these rules are not followed a postcode may not be uniquely identifiable. There are some valid postcodes in which the postal area has only one letter, for example B for Birmingham and S for Sheffield and others for which an additional letter is added to provide further subdivision, as in “WC1B 4JB”.
The unit postcode has become the most widely-used small geographical code in the UK. With the addition of a property name or number it will usually provide a unique identifier for an address. Unlike the higher levels of the hierarchy, unit postcodes do not have definitive mapped boundaries but exist only as a list of addresses maintained by Royal Mail. This can cause ambiguity in the assignment of postcodes to any location other than a postal address. Further ambiguities are caused by continual changes to the postcode system, usually dictated by changing residential and commercial addresses and the operational needs of the mail delivery system. If a new house is built, it will often be included within an existing postcode, but a new residential development comprising many houses will be allocated a new sequence of postcodes. Occasionally, major recoding takes place, for example when Royal Mail run out of codes in a particular area. Confusingly, postcodes can sometimes be discontinued and then re-used at another location. Districts in the SO area such as SO1 were discontinued in the early 1990s because they did not contain enough codes, being replaced with many more subdivisions such as SO15, SO16 and SO17. Lists of postcodes including their locations, dates of introduction and termination and their relationship with other administrative areas have been maintained since the early 1980s and are a powerful tool when matching data from different areal units.