In one test projects I was involved in testing a web form we were talking about the postcode format and I wanted to understand a bit more of what and how UK postcodes are based on.
A little research and I found a PDF published online by MRS (The Market Research Society) which is given as follow:
A Postcode is made up of the following elements:
PO the area. There are 124 postcode areas in the UK
1 the district. There are approximately 20 Postcode districts in an area
3 the sector. There are approximately 3000 addresses in a sector.
AX the Unit. There are approximately 15 addresses per unit.
The following list shows all valid Postcode formats. “A” indicates an alphabetic character and “N” indicates a numeric character.
|AN NAA||M1 1AA|
|ANN NAA||M60 1NW|
|AAN NAA||CR2 6XH|
|AANN NAA||DN55 1PT|
|ANA NAA||W1A 1HQ|
|AANA NAA||EC1A 1BB|
Please note the following:
- The letters Q, V and X are not used in the first position
The letters I,J and Z are not used in the second position.
The only letters to appear in the third position are A, B, C, D, E, F, G, H, J, K, S, T, U and W.
The second half of the postcode is always consistent numeric, alpha, alpha format and the letters C, I, K, M, O and V are never used.
Postcodes should always be in BLOCK CAPITALS as the last line of an address. Do not underline the postcode or use any punctuation. Leave a clear space of one character between the two parts of the postcode and do not join the characters in any way.
Elements of a Postcode
The first part of the Postcode eg PO1 is called the outward code as it identifies the town or district to which the letter is to be sent for further sorting.
The second part of the postcode eg 1EB is called the inward code. This identifies the particular sector in the town or district to which the letter has been delivered and a thoroughfare, part of a thoroughfare or an individual address within that sector. The maximum number of delivery points covered by one postcode is 100 and the average is 15.
Postcode Area – this is the largest geographical unit of the postcode. Each one comprises one or two alpha characters generally chosen to be a mnemonic of the area eg MK for Milton Keynes, SO for Southampton. There are currently 124 Postcode areas including Guernsey (GY) Jersey (JE) and the Isle of Man (IM)
Postcode District – Each postcode area is divided into a number of districts which are represented by the numerical portion of each part of the postcode. These numbers range from 0 to 99 eg MK42. In London a further alpha character is used to divide some districts into sub divisions eg EC1A.
Postcode sectors – Sectors are numbered 1,2,3,4,5,6,7,8,9,0. It should be noted that when sorting postcodes into order, sector 0 is the tenth sector rather than the first.
(These conventions may change if operationally required.)