UK postcodes
Encyclopedia
The postal code
Postal code
A postal code is a series of letters and/or digits appended to a postal address for the purpose of sorting mail. Once postal codes were introduced, other applications became possible.In February 2005, 117 of the 190 member countries of the Universal Postal Union had postal code systems...

s used in the United Kingdom
United Kingdom
The United Kingdom of Great Britain and Northern IrelandIn the United Kingdom and Dependencies, other languages have been officially recognised as legitimate autochthonous languages under the European Charter for Regional or Minority Languages...

 are known as postcodes. They are alphanumeric
Alphanumeric
Alphanumeric is a combination of alphabetic and numeric characters, and is used to describe the collection of Latin letters and Arabic digits or a text constructed from this collection. There are either 36 or 62 alphanumeric characters. The alphanumeric character set consists of the numbers 0 to...

 and were introduced by the Royal Mail
Royal Mail
Royal Mail is the government-owned postal service in the United Kingdom. Royal Mail Holdings plc owns Royal Mail Group Limited, which in turn operates the brands Royal Mail and Parcelforce Worldwide...

 over a 15-year period from 11th October 1959 to 1974. A full postcode is known as a "postcode unit" and usually corresponds to a limited number of addresses or a single large delivery point.

Postcodes have been adopted for a wide range of purposes in addition to aiding the automated sorting of the mail; and are used to calculate insurance premiums, designate destinations in route planning software
Route planning software
Route planning software is a computer software programme, designed to plan a route between two geographical locations using a journey planning engine, typically specialised for road networks as a road route planner. It can typically provide a list of places one will pass by, with crossroads and...

, form postcode gangs, and are used as the lowest level of aggregation in census
Census
A census is the procedure of systematically acquiring and recording information about the members of a given population. It is a regularly occurring and official count of a particular population. The term is used mostly in connection with national population and housing censuses; other common...

 enumeration. Postcode data is stored, maintained and periodically updated in the Postcode Address File
Postcode Address File
The Postcode Address File is a database which contains all known "Delivery Points" and postcodes in the United Kingdom. Buildings which contain several flats or businesses but only one external front door, will only have the external front door listed; the full addresses which include flat...

 database, along with the full address data for around 27.5 million delivery points.

An earlier system of postal districts was implemented in London and other large cities from 1857. In London this system was refined in 1917 to include numbered subdivisions, extending to the other cities in 1934. These earlier districts were later incorporated into the national postcode system.

Overview

The postcodes are alphanumeric and between five and eight characters long (including a single space separating the outward and inward parts of the code), e.g. the code for the House of Commons is SW1A 0AA. These codes were introduced by the Royal Mail
Royal Mail
Royal Mail is the government-owned postal service in the United Kingdom. Royal Mail Holdings plc owns Royal Mail Group Limited, which in turn operates the brands Royal Mail and Parcelforce Worldwide...

 between 1959 and 1974. They have been widely adopted not just for their original purpose of automating the sorting of mail, but for many other purposes – see postcode lottery
Postcode lottery
In the United Kingdom, the term postcode lottery refers to the way the allocation of postcodes, which often bears little relation to local government boundaries, can affect such things as insurance prices...

.

The 'Outward' part of the postcode denotes the postal district - for example RH for the Redhill area, and then the following number distinguishes the post town
Post town
A post town is a required part of all postal addresses in the United Kingdom, and a basic unit of the postal delivery system. Including the correct post town in the address increases the chances of a letter or parcel being delivered on time. Post towns are usually based upon the location of...

 – broadly speaking the Delivery Office that services the local area. So RH1 is Redhill itself, RH10 is Crawley. With larger towns there may be more than one number in the outward section – Crawley includes RH10 and RH11. In this case, RH also covers north Sussex, and has little to do with Redhill historically, apart from the railway links.

The reverse situation is uncommon but can also occur, with a single postal district lying within more than one post town - for example, the WN8 district straddles Wigan and Skelmersdale post towns. The 'Inward' part denotes particular parts of the town / Delivery Office area, with the first part – the number – being a sector, and the final two letters denoting a property or group of properties within that area. In the case of a large office block, for example, the 'Inward' part of the code may denote just a part of the office block, or often just a single company within that block (particularly where the company receives a large amount of mail). In some cases (for instance DVLA
Driver and Vehicle Licensing Agency
The Driver and Vehicle Licensing Agency is the organisation of the UK Government responsible for maintaining a database of drivers and a database of vehicles in Great Britain; its counterpart in Northern Ireland is the Driver & Vehicle Agency...

) the "inward" code may serve to direct mail to different parts of the same organisation.

Postcodes are used to sort letters to their destination either manually, where sorters use labelled frames, or increasingly with letter-coding systems where machines assist in the sorting work. A further variation of automated sorting uses optical character recognition
Optical character recognition
Optical character recognition, usually abbreviated to OCR, is the mechanical or electronic translation of scanned images of handwritten, typewritten or printed text into machine-encoded text. It is widely used to convert books and documents into electronic files, to computerize a record-keeping...

 (OCR) to read printed postcodes directly from envelopes, though these systems are best suited to mail that uses a guaranteed layout and addressing format.

A long string of "faced" letters (i.e. turned to allow the address to be read) are presented to a keyboard operator at a coding desk who types the postcodes for each destination onto their letter fronts in coloured phosphor dots. The associated machine uses the outward codes in these dots to direct bundles of letters into the correct bags for specific delivery offices. With a machine knowledge of the specific addresses handled by each delivery man at each office, the bundles can be further sorted, using the dots of the inward sorting code so that each delivery man at each destination receives only his "own" letters. This latter feature depends upon whether or not it is cost effective to second sort outward letters, and tends to be used only at main sorting offices where high volumes are handled. When postcodes are incomplete or missing altogether, the operator reads the post town name and inserts a code sufficient for outward sorting to the near-destination where others can further direct it. The mail bags of letter bundles are sent by air or train, and eventually road to the required delivery office. At the delivery office the mail that is handled manually is inward sorted, postal route (or walk) will deliver the item, and it is then "set in" by each, that is, it is sorted into the walk order that allows the delivery man the most convenient progress in his round. The latter process is now being automated, as the rollout of walk sequencing machines continues.

Development

The Post Office experimented with electromechanical sorting machines in the late 1950s. These devices would present an envelope to an operator, who would press a button indicating which bin to sort the letter into. Postcodes were suggested to increase the efficiency of this process, by removing the need for the sorter to remember the correct sorting for as many places. In January 1959 the Post Office analysed the results of a survey on public attitudes towards the use of postal codes. The next step would be to choose a town in which to experiment with coded addresses. The envisaged format was a six character alphanumeric code with three letters designating the geographical area and three numbers to identify the individual address. On 28 July Ernest Marples
Ernest Marples
Alfred Ernest Marples, Baron Marples PC was a British Conservative politician who served as Postmaster General and Minister of Transport. After his retirement from active politics in 1974 Marples was elevated to the peerage...

, the Postmaster General, announced that Norwich
Norwich
Norwich is a city in England. It is the regional administrative centre and county town of Norfolk. During the 11th century, Norwich was the largest city in England after London, and one of the most important places in the kingdom...

 had been selected, and that each of the 150,000 private and business addresses would receive a code by October. Norwich had been selected as it already had eight automatic mail sorting machines in use. The codes were prefixed NOR.

In October 1965 it was confirmed that postal coding was to be extended to the rest of the country in the "next few years". On 1 May 1967 postcodes were introduced in Croydon
Croydon
Croydon is a town in South London, England, located within the London Borough of Croydon to which it gives its name. It is situated south of Charing Cross...

. The codes for central Croydon started with the three letters CRO, and those of the surrounding post town
Post town
A post town is a required part of all postal addresses in the United Kingdom, and a basic unit of the postal delivery system. Including the correct post town in the address increases the chances of a letter or parcel being delivered on time. Post towns are usually based upon the location of...

s with CR2, CR3 and CR4. This was to be the beginning of a ten year plan, costing an estimated £24 million. Within two years it was expected that coding would be used in Aberdeen
Aberdeen
Aberdeen is Scotland's third most populous city, one of Scotland's 32 local government council areas and the United Kingdom's 25th most populous city, with an official population estimate of ....

, Belfast
Belfast
Belfast is the capital of and largest city in Northern Ireland. By population, it is the 14th biggest city in the United Kingdom and second biggest on the island of Ireland . It is the seat of the devolved government and legislative Northern Ireland Assembly...

, Brighton
Brighton
Brighton is the major part of the city of Brighton and Hove in East Sussex, England on the south coast of Great Britain...

, Bristol
Bristol
Bristol is a city, unitary authority area and ceremonial county in South West England, with an estimated population of 433,100 for the unitary authority in 2009, and a surrounding Larger Urban Zone with an estimated 1,070,000 residents in 2007...

, Bromley
Bromley
Bromley is a large suburban town in south east London, England and the administrative headquarters of the London Borough of Bromley. It was historically a market town, and prior to 1963 was in the county of Kent and formed the administrative centre of the Municipal Borough of Bromley...

, Cardiff
Cardiff
Cardiff is the capital, largest city and most populous county of Wales and the 10th largest city in the United Kingdom. The city is Wales' chief commercial centre, the base for most national cultural and sporting institutions, the Welsh national media, and the seat of the National Assembly for...

, Coventry
Coventry
Coventry is a city and metropolitan borough in the county of West Midlands in England. Coventry is the 9th largest city in England and the 11th largest in the United Kingdom. It is also the second largest city in the English Midlands, after Birmingham, with a population of 300,848, although...

, Manchester
Manchester
Manchester is a city and metropolitan borough in Greater Manchester, England. According to the Office for National Statistics, the 2010 mid-year population estimate for Manchester was 498,800. Manchester lies within one of the UK's largest metropolitan areas, the metropolitan county of Greater...

, Newcastle upon Tyne
Newcastle upon Tyne
Newcastle upon Tyne is a city and metropolitan borough of Tyne and Wear, in North East England. Historically a part of Northumberland, it is situated on the north bank of the River Tyne...

, Newport
Newport
Newport is a city and unitary authority area in Wales. Standing on the banks of the River Usk, it is located about east of Cardiff and is the largest urban area within the historic county boundaries of Monmouthshire and the preserved county of Gwent...

, Reading
Reading, Berkshire
Reading is a large town and unitary authority area in England. It is located in the Thames Valley at the confluence of the River Thames and River Kennet, and on both the Great Western Main Line railway and the M4 motorway, some west of London....

, Sheffield
Sheffield
Sheffield is a city and metropolitan borough of South Yorkshire, England. Its name derives from the River Sheaf, which runs through the city. Historically a part of the West Riding of Yorkshire, and with some of its southern suburbs annexed from Derbyshire, the city has grown from its largely...

, Southampton
Southampton
Southampton is the largest city in the county of Hampshire on the south coast of England, and is situated south-west of London and north-west of Portsmouth. Southampton is a major port and the closest city to the New Forest...

 and the Western district of London.
By 1967 codes had been introduced to Aberdeen, Southampton, Brighton and Derby
Derby
Derby , is a city and unitary authority in the East Midlands region of England. It lies upon the banks of the River Derwent and is located in the south of the ceremonial county of Derbyshire. In the 2001 census, the population of the city was 233,700, whilst that of the Derby Urban Area was 229,407...

. In 1970 codes were introduced to the Western and North Western
NW postcode area
The NW postcode area, also known as the London NW postcode area, is a group of postcode districts covering part of northwest London, England...

 London areas. In December 1970 Christmas mail was franked with the message "Remember to use the Postcode", although codes were only used to sort mail in a handful of sorting office
Sorting office
Sorting office or Processing and Distribution Center is any location where postal operators bring mail after collection for sorting into batches for delivery to the addressee, which may be a direct delivery or sent onwards to another regional or local sorting office, or to another postal...

s.

During 1971 occupants of addresses began to receive notification of their postcode. Asked in the House of Commons about the completion of the coding exercise, the Minister of State for Posts and Telecommunications
Minister of State
Minister of State is a title borne by politicians or officials in certain countries governed under a parliamentary system. In some countries a "minister of state" is a junior minister, who is assigned to assist a specific cabinet minister...

 (whose role superseded that of Postmaster General in 1969), Sir John Eden
John Eden, Baron Eden of Winton
John Benedict Eden, Baron Eden of Winton, Bt, PC is a British Conservative politician.-Background:Eden was educated at Eton College and St Paul's School, United States. He served as a Lieutenant with the Rifle Brigade, 2nd Gurkha Rifles and the Gilgit Scouts during the Second World War...

, stated that it was expected to be completed during 1972. The scheme was finalised in 1974 when Norwich was completely re-coded but the scheme tested in Croydon was sufficiently close to the final design for it to be retained, with CRO standardised as CR0 (district zero). The central Newport area was originally allocated NPT, in a similar way to Norwich and Croydon, with the surrounding areas allocated NP1–NP8. This lasted until the end of 1984 when for operational reasons (NPT being non-standard and too similar to NP7) it was recoded to NP9. Girobank
Girobank
Girobank was a British public sector financial institution founded in 1968 by the General Post Office. Itstarted life as the National Giro but went through several name changes, becoming National Girobank, then Girobank Plc , before merging into Alliance & Leicester Commercial Bank...

's GIR 0AA, the last domestic postcode with a wholly alphabetical outward code, no longer exists in the Royal Mail's PAF system, but remains in active use by the bank's owners, currently Santander UK
Santander UK
Santander UK plc is a wholly owned subsidiary of the Spanish Santander Group. Based in the United Kingdom, it operates under the name of Santander. Santander is the third largest bank in the UK in terms of deposits, the second largest in terms of mortgages held, and the fourth largest in terms of...

.

London

The London
London postal district
The London postal district is the area in England, currently of , to which mail addressed to the LONDON post town is delivered. The area was initially devised in 1856 and throughout its history has been subject to periodic reorganisation, contraction and division into increasingly smaller postal...

 post town covers 40% of Greater London
Greater London
Greater London is the top-level administrative division of England covering London. It was created in 1965 and spans the City of London, including Middle Temple and Inner Temple, and the 32 London boroughs. This territory is coterminate with the London Government Office Region and the London...

. When introduced in 1857/8 it was divided into ten areas with codes indicating the areas they covered: EC, WC, N, NE, E, SE, S, SW, W, and NW. The S and NE sectors were later abolished and in 1917, as a wartime measure to improve efficiency, the districts were further subdivided with a number applied to each sub-district. This was achieved by designating the area served directly by the head office in each district as "1" and then allocating the other numbers according to the alphabetical position of the names of the locations of each delivery office (e.g. N2 East Finchley, N3 Finchley, N4 Finsbury Park etc.).

Other large towns

Following the successful introduction of postal districts in London, the system was gradually extended to a number of other large towns in the United Kingdom. Liverpool was divided into Eastern, Northern, Southern and Western districts in 1864/65, and Manchester and Salford into eight numbered districts in 1867/68.

In 1917 Dublin was divided into numbered postal districts. These continue in use in a modified form by the postal service
An Post
An Post is the State-owned provider of postal services in the Republic of Ireland. An Post provides a universal postal service to all parts of the country as a member of the Universal Postal Union...

 of the independent Republic of Ireland
Republic of Ireland
Ireland , described as the Republic of Ireland , is a sovereign state in Europe occupying approximately five-sixths of the island of the same name. Its capital is Dublin. Ireland, which had a population of 4.58 million in 2011, is a constitutional republic governed as a parliamentary democracy,...

. In 1923 Glasgow was divided in a similar way to London, with numbered districts preceded by a letter denoting the compass point (C, W, NW, N, E, S, SW, SE).

In January 1932 the Postmaster General approved the division of a number of large towns into numbered districts. In November 1934 the Post Office announced the introduction of the districts in "every provincial town in the United Kingdom large enough to justify it". Pamphlets were issued to each householder and business in the ten selected areas notifying them of the number of the district in which their premises lay. The pamphlets also included a map of the divisions, and copies were made available at local head post offices. The public were "particularly invited" to include the district number in the address at the head of all private or business letters. A publicity campaign in the following year was made to encourage the use of the district numbers. The slogan for the campaign was "For speed and certainty always use a postal district number on your letters and notepaper". A poster was fixed to every pillar box in the affected areas bearing the number of the district and appealing for the public's co-operation. Every post office in the numbered district was also to display this information. Printers of Christmas cards and stationery were requested to always include district numbers in addresses, and election agent
Election agent
In elections in the United Kingdom, as well as in certain other similar political systems such as India's, an election agent is the person legally responsible for the conduct of a candidate's political campaign and to whom election material is sent to by those running the election. In elections in...

s for candidates in the upcoming general election
United Kingdom general election, 1935
The United Kingdom general election held on 14 November 1935 resulted in a large, though reduced, majority for the National Government now led by Conservative Stanley Baldwin. The greatest number of MPs, as before, were Conservative, while the National Liberal vote held steady...

 were asked to ensure they correctly addressed the 100 million items of mail they were expected to post. In addition, businesses were issued with a free booklet containing maps and listings of the correct district number for every street in the ten areas.

The ten areas were:

  • Birmingham
    Birmingham
    Birmingham is a city and metropolitan borough in the West Midlands of England. It is the most populous British city outside the capital London, with a population of 1,036,900 , and lies at the heart of the West Midlands conurbation, the second most populous urban area in the United Kingdom with a...

  • Brighton
    Brighton
    Brighton is the major part of the city of Brighton and Hove in East Sussex, England on the south coast of Great Britain...

    /Hove
    Hove
    Hove is a town on the south coast of England, immediately to the west of its larger neighbour Brighton, with which it forms the unitary authority Brighton and Hove. It forms a single conurbation together with Brighton and some smaller towns and villages running along the coast...

  • Bristol
    Bristol
    Bristol is a city, unitary authority area and ceremonial county in South West England, with an estimated population of 433,100 for the unitary authority in 2009, and a surrounding Larger Urban Zone with an estimated 1,070,000 residents in 2007...

  • Edinburgh
    Edinburgh
    Edinburgh is the capital city of Scotland, the second largest city in Scotland, and the eighth most populous in the United Kingdom. The City of Edinburgh Council governs one of Scotland's 32 local government council areas. The council area includes urban Edinburgh and a rural area...


  • Glasgow
    Glasgow
    Glasgow is the largest city in Scotland and third most populous in the United Kingdom. The city is situated on the River Clyde in the country's west central lowlands...

  • Leeds
    Leeds
    Leeds is a city and metropolitan borough in West Yorkshire, England. In 2001 Leeds' main urban subdivision had a population of 443,247, while the entire city has a population of 798,800 , making it the 30th-most populous city in the European Union.Leeds is the cultural, financial and commercial...

    /Bradford
    Bradford
    Bradford lies at the heart of the City of Bradford, a metropolitan borough of West Yorkshire, in Northern England. It is situated in the foothills of the Pennines, west of Leeds, and northwest of Wakefield. Bradford became a municipal borough in 1847, and received its charter as a city in 1897...

  • Liverpool
    Liverpool
    Liverpool is a city and metropolitan borough of Merseyside, England, along the eastern side of the Mersey Estuary. It was founded as a borough in 1207 and was granted city status in 1880...

  • Manchester
    Manchester
    Manchester is a city and metropolitan borough in Greater Manchester, England. According to the Office for National Statistics, the 2010 mid-year population estimate for Manchester was 498,800. Manchester lies within one of the UK's largest metropolitan areas, the metropolitan county of Greater...

    /Salford

  • Newcastle upon Tyne
    Newcastle upon Tyne
    Newcastle upon Tyne is a city and metropolitan borough of Tyne and Wear, in North East England. Historically a part of Northumberland, it is situated on the north bank of the River Tyne...

  • Sheffield
    Sheffield
    Sheffield is a city and metropolitan borough of South Yorkshire, England. Its name derives from the River Sheaf, which runs through the city. Historically a part of the West Riding of Yorkshire, and with some of its southern suburbs annexed from Derbyshire, the city has grown from its largely...


Each was divided into numbered postal districts, e.g. Toxteth
Toxteth
Toxteth is an inner city area of Liverpool, England. Located to the south of the city, Toxteth is bordered by Liverpool City Centre, Dingle, Edge Hill, Wavertree and Aigburth.-Description:...

 in Liverpool was Liverpool 8. A single numbering sequence was split between Manchester and Salford. Letters would be addressed to Manchester 1 or Salford 4. Some Birmingham codes were sub-divided, with a letter, such as Great Barr, Birmingham 22 or Birmingham 22a – as can still be seen on many older street-name signs.

Adaptation into national system

When the national postcode system was introduced, many existing postal districts were incorporated into it, so that postcodes in Toxteth (Liverpool 8) start with L8. The districts in both Manchester and Salford gained "M" postcodes, so "Salford 4" became M4, etc. in other cases, the district numbers were replaced with new, unrelated postcode district numbers. The old coding lives on in a small number of street signs which are still embossed with "Salford 4" etc., at the bottom. In Glasgow postcodes were mapped into the new 'G' postcode area: C1 became G1, W1 became G11, N1 became G21, E1 became G31, S1 became G41, SW1 became G51, and so on. In London the 1917 postal districts mapped directly to the new postcode districts. The remaining 60% of Greater London was allocated postcodes under the national plan.

Some older road signs in London's Hackney area still indicate a North East (NE) postcode today (for example, this sign on Victoria Park Road).

Format

The format of UK postcodes is as follows, where A signifies a letter and 9 a digit:
Format Example Coverage
A9 9AA M1 1AA B, E, G, L, M, N, S, W postcode areas
A99 9AA B33 8TH
AA9 9AA CR2 6XH All postcode areas except B, E, G, L, M, N, S, W, WC
AA99 9AA DN55 1PT
A9A 9AA W1A 1HQ E1W, N1C, N1P, W1 postcode districts (high density areas where codes ran out)
AA9A 9AA EC1A 1BB WC postcode area; EC1–EC4, NW1W, SE1P, SW1 postcode districts (high density areas where codes ran out)


This can be generalised as: (one or two letters)(number between 0 and 99)(zero or one letter)(space)(single digit)(two letters)

It is a hierarchical system, working from left to right:
  • The two to four characters before the space comprise the outward code or out code intended to direct mail from the sorting office to the delivery office:
    • The first letter or pair of letters represents the postcode area.
    • The following number, from 0 to 99, determines the postcode district within that area.
      • Areas which have only single-digit districts: BR, FY, HA, HD, HG, HR, HS, HX, JE, LD, SM, SR, WC, WN, ZE.
      • Areas which have only double-digit districts: AB, LL, SO.
      • Only a few areas have a district 0 (zero): BL, CM, CR, FY, HA, PR, SL, SS; none of these areas also has a district 10, and district 0 is sometimes treated as though it were the tenth district in the area and sorted after district 9.
      • In central London, some overcrowded single-digit postcode districts have been further divided by inserting a letter after the digit and before the space. This applies to all of EC1–EC4 (but not EC50), SW1, W1, WC1 and WC2; and to part of E1 (E1W), N1 (N1C and N1P), NW1 (NW1W) and SE1 (SE1P). All letters in the set ABCDEFGHJKMNPRSTUVWXY are currently used as the trailing letter in one or more divided districts, which excludes the five letters ILOQZ.
      • The term "postcode district" is ambiguous in common usage, as it may refer either collectively to all the alphabetical and non-alphabetical parts in a (former) district, or only to one such part. For example, a reference to N1 might be intended either to include or to exclude N1C and N1P, depending on context, and N1C might be said to be a district or (loosely) part of the N1 district.
  • The outward code is followed by a space.
  • The three characters after the space comprise the inward code or in code intended to sort mail at the final delivery office:
    • The first character after the space is a digit from 0 to 9 which determines the postcode sector. Originally, Royal Mail sorted sector 0 after 9 instead of before 1, effectively treating it as the 10th not the 1st sector label.
    • The final two letters form the postcode unit. The letters in the inward code are restricted to the set ABDEFGHJLNPQRSTUWXYZ, which excludes the six letters CIKMOV so as not to resemble digits or each other when hand-written.


Each postcode unit generally represents a street, part of a street, or a single address. This feature makes postcodes useful to route planning software
Route planning software
Route planning software is a computer software programme, designed to plan a route between two geographical locations using a journey planning engine, typically specialised for road networks as a road route planner. It can typically provide a list of places one will pass by, with crossroads and...

.
Component Part Example Live codes Terminated codes Other codes Total
postcode area out code YO 124 0 3 127
postcode district out code YO31 2,971 103 4 3,078
postcode sector in code YO31 1 10,631 1,071 4 11,706
postcode unit in code YO31 1EB 1,762,464 650,417 4 2,412,885
Postcode Addresses
Postcode Address File
The Postcode Address File is a database which contains all known "Delivery Points" and postcodes in the United Kingdom. Buildings which contain several flats or businesses but only one external front door, will only have the external front door listed; the full addresses which include flat...

 
approx. 27,000,000


The letters in the outward code give some clue to its approximate geographical location. For example, L indicates Liverpool
Liverpool
Liverpool is a city and metropolitan borough of Merseyside, England, along the eastern side of the Mersey Estuary. It was founded as a borough in 1207 and was granted city status in 1880...

, EH indicates Edinburgh
Edinburgh
Edinburgh is the capital city of Scotland, the second largest city in Scotland, and the eighth most populous in the United Kingdom. The City of Edinburgh Council governs one of Scotland's 32 local government council areas. The council area includes urban Edinburgh and a rural area...

 and AB indicates Aberdeen
Aberdeen
Aberdeen is Scotland's third most populous city, one of Scotland's 32 local government council areas and the United Kingdom's 25th most populous city, with an official population estimate of ....

; see List of postcode areas in the United Kingdom for a full list. Most postcode areas outside London cover many towns and localities beyond the city after which they are named. For instance, although BT indicates Belfast
Belfast
Belfast is the capital of and largest city in Northern Ireland. By population, it is the 14th biggest city in the United Kingdom and second biggest on the island of Ireland . It is the seat of the devolved government and legislative Northern Ireland Assembly...

, it covers the whole of Northern Ireland
Northern Ireland
Northern Ireland is one of the four countries of the United Kingdom. Situated in the north-east of the island of Ireland, it shares a border with the Republic of Ireland to the south and west...

.

Non-geographic codes

Most postcodes map directly to a geographic area but some are used only for routing and cannot be used for navigation or distance-finding applications. Non-geographic postcodes are often used for direct marketing
Direct marketing
Direct marketing is a channel-agnostic form of advertising that allows businesses and nonprofits to communicate straight to the customer, with advertising techniques such as mobile messaging, email, interactive consumer websites, online display ads, fliers, catalog distribution, promotional...

 and PO boxes. Some postcode sectors or districts are set aside solely for non-geographic postcodes, including EC50, BS98, BT58, IM99, N1P, NE99, SW99 and JE4.

Girobank
Girobank
Girobank was a British public sector financial institution founded in 1968 by the General Post Office. Itstarted life as the National Giro but went through several name changes, becoming National Girobank, then Girobank Plc , before merging into Alliance & Leicester Commercial Bank...

's headquarters in Bootle
Bootle
Bootle is a town within the Metropolitan Borough of Sefton in Merseyside, England, and a 'Post town' in the L postcode area. Formally known as Bootle-cum-Linacre, the town is 4 miles  to the north of Liverpool city centre, and has a total resident population of 77,640.Historically part of...

 uses the non-geographic postcode GIR 0AA which is unique in format. There is also a non-geographic postcode area, BX, solely for non-geographic addresses. Postcodes beginning with BX follow the standard format but are allocated independently of the location of the recipient and can be retained in the event of the recipient moving. Prominent users include Lloyds TSB and HM Revenue and Customs. There is a special postcode for letters to Father Christmas
Father Christmas
Father Christmas is the name used in many English-speaking countries for a figure associated with Christmas. A similar figure with the same name exists in several other countries, including France , Spain , Brazil , Portugal , Italy , Armenia , India...

: SAN TA1.

Special postcodes

Postcodes are usually allocated solely for logistical convenience, however there are a few informal exceptions.

Britain's constitutional hierarchy is unofficially reflected in the ordering of the following three postcodes:
Postcode Location
SW1A 0AA House of Commons (pre-eminent democratic chamber; see table below for House of Lords)
SW1A 1AA Buckingham Palace
Buckingham Palace
Buckingham Palace, in London, is the principal residence and office of the British monarch. Located in the City of Westminster, the palace is a setting for state occasions and royal hospitality...

 (official residence of head of state
Head of State
A head of state is the individual that serves as the chief public representative of a monarchy, republic, federation, commonwealth or other kind of state. His or her role generally includes legitimizing the state and exercising the political powers, functions, and duties granted to the head of...

)
SW1A 2AA 10 Downing Street
10 Downing Street
10 Downing Street, colloquially known in the United Kingdom as "Number 10", is the headquarters of Her Majesty's Government and the official residence and office of the First Lord of the Treasury, who is now always the Prime Minister....

 (official residence of head of government
Head of government
Head of government is the chief officer of the executive branch of a government, often presiding over a cabinet. In a parliamentary system, the head of government is often styled prime minister, chief minister, premier, etc...

)


Organisations which receive enough post to justify having a dedicated postcode also, in a small proportion of cases, have their organisation name reflected in the last part of the code. Prominent examples include:
Postcode Organisation
BS98 1TL TV Licensing
BX1 1LT Lloyds TSB Bank
Lloyds TSB
Lloyds TSB Bank Plc is a retail bank in the United Kingdom. It was established in 1995 by the merger of Lloyds Bank, established in Birmingham, England in 1765 and traditionally considered one of the Big Four clearing banks, with the TSB Group which traces its origins to 1810...

 (non-geographic address)
BX3 2BB Barclays Bank (non-geographic address)
BX5 5AT VAT
Value added tax
A value added tax or value-added tax is a form of consumption tax. From the perspective of the buyer, it is a tax on the purchase price. From that of the seller, it is a tax only on the "value added" to a product, material or service, from an accounting point of view, by this stage of its...

 Central Unit of HM Revenue and Customs (non-geographic address). 5 is roman numeral "V", so 5AT = VAT.
CF10 1BH Lloyds Banking Group (Formerly Black Horse Finance)
Lloyds Banking Group
Lloyds Banking Group plc is a major British financial institution, formed through the acquisition of HBOS by Lloyds TSB in 2009. As at February 2010, HM Treasury held a 41% shareholding through UK Financial Investments Limited . The Group headquarters is located at 25 Gresham Street in London, with...

CF99 1NA National Assembly for Wales
National Assembly for Wales
The National Assembly for Wales is a devolved assembly with power to make legislation in Wales. The Assembly comprises 60 members, who are known as Assembly Members, or AMs...

DE99 3GG Egg Banking
DH98 1BT British Telecom
BT Group
BT Group plc is a global telecommunications services company headquartered in London, United Kingdom. It is one of the largest telecommunications services companies in the world and has operations in more than 170 countries. Through its BT Global Services division it is a major supplier of...

DH99 1NS National Savings
National Savings and Investments
National Savings and Investments , formerly called the Post Office Savings Bank and National Savings, is a state-owned savings bank in the United Kingdom. It is an executive agency of the Chancellor of the Exchequer...

 certificates administration
E16 1XL ExCeL London
N1 9GU GUardian
The Guardian
The Guardian, formerly known as The Manchester Guardian , is a British national daily newspaper in the Berliner format...

newspaper
E98 1NW News of the World
News of the World
The News of the World was a national red top newspaper published in the United Kingdom from 1843 to 2011. It was at one time the biggest selling English language newspaper in the world, and at closure still had one of the highest English language circulations...

newspaper (no longer in circulation)
E98 1SN The Sun
The Sun (newspaper)
The Sun is a daily national tabloid newspaper published in the United Kingdom and owned by News Corporation. Sister editions are published in Glasgow and Dublin...

newspaper
E98 1ST The Sunday Times
The Sunday Times
The Sunday Times is a British Sunday newspaper.The Sunday Times may also refer to:*The Sunday Times *The Sunday Times *The Sunday Times *The Sunday Times...

newspaper
E98 1TT The Times
The Times
The Times is a British daily national newspaper, first published in London in 1785 under the title The Daily Universal Register . The Times and its sister paper The Sunday Times are published by Times Newspapers Limited, a subsidiary since 1981 of News International...

newspaper
EC2N 2DB Deutsche Bank
Deutsche Bank
Deutsche Bank AG is a global financial service company with its headquarters in Frankfurt, Germany. It employs more than 100,000 people in over 70 countries, and has a large presence in Europe, the Americas, Asia Pacific and the emerging markets...

EC4Y 0HQ Royal Mail Group Ltd headquarters (relocated from EC1V 9HQ)
EH99 1SP Scottish Parliament
Scottish Parliament
The Scottish Parliament is the devolved national, unicameral legislature of Scotland, located in the Holyrood area of the capital, Edinburgh. The Parliament, informally referred to as "Holyrood", is a democratically elected body comprising 129 members known as Members of the Scottish Parliament...

G58 1SB National Savings Bank
National Savings and Investments
National Savings and Investments , formerly called the Post Office Savings Bank and National Savings, is a state-owned savings bank in the United Kingdom. It is an executive agency of the Chancellor of the Exchequer...

 (the district number 58 also approximates the outline of the initials SB)
GIR 0AA Girobank
Girobank
Girobank was a British public sector financial institution founded in 1968 by the General Post Office. Itstarted life as the National Giro but went through several name changes, becoming National Girobank, then Girobank Plc , before merging into Alliance & Leicester Commercial Bank...

, subsequently Alliance & Leicester Commercial Bank (non-geographic postcode)
IV21 2LR Two Lochs Radio
Two Lochs Radio
Two Lochs Radio is Britain's smallest commercial radio station, and community broadcaster for the Gairloch, Loch Ewe and Loch Maree areas of Wester Ross, in the Highlands of Scotland...

 (radio station in Gairloch
Gairloch
Gairloch is a village, civil parish and community on the shores of Loch Gairloch on the northwest coast of Scotland. A popular tourist destination in the summer months, Gairloch has a golf course, a small museum, several hotels, a community centre, a leisure centre with sports facilities, a local...

, using all three characters of inbound code)
L30 4GB Girobank (alternative geographic postcode)
LS98 1FD First Direct
First Direct
First Direct is a telephone and internet-based retail bank in the United Kingdom, a division of HSBC Bank plc. First Direct has headquarters in Leeds, West Yorkshire, England, and has 1.16 million customers....

 bank
NG80 1EH Experian Embankment House
Experian
Experian plc, formerly known as CCN Systems, is a global credit information group with operations in 36 countries. The company employs 15,500 people with corporate headquarters in Dublin, Ireland and operational headquarters in Nottingham, England and Costa Mesa, California, US...

NG80 1LH Experian Lambert House
Experian
Experian plc, formerly known as CCN Systems, is a global credit information group with operations in 36 countries. The company employs 15,500 people with corporate headquarters in Dublin, Ireland and operational headquarters in Nottingham, England and Costa Mesa, California, US...

NG80 1RH Experian Riverleen House
Experian
Experian plc, formerly known as CCN Systems, is a global credit information group with operations in 36 countries. The company employs 15,500 people with corporate headquarters in Dublin, Ireland and operational headquarters in Nottingham, England and Costa Mesa, California, US...

NG80 1TH Experian Talbot House
Experian
Experian plc, formerly known as CCN Systems, is a global credit information group with operations in 36 countries. The company employs 15,500 people with corporate headquarters in Dublin, Ireland and operational headquarters in Nottingham, England and Costa Mesa, California, US...

NG80 1ZZ Experian Landmark House
Experian
Experian plc, formerly known as CCN Systems, is a global credit information group with operations in 36 countries. The company employs 15,500 people with corporate headquarters in Dublin, Ireland and operational headquarters in Nottingham, England and Costa Mesa, California, US...

N81 1ER Electoral Reform Services Limited
SE1 8UJ Union Jack Club
Union Jack Club
The Union Jack Club is a residential London club for members and veterans of the British Armed Services , including serving members of the Volunteer Reserve Forces, below commissioned rank...

SE9 2UG University of Greenwich
University of Greenwich
The University of Greenwich is a British university located in the London Borough of Greenwich, London, England. The main campus is located on the grounds of the Old Royal Naval College, a central location within the Maritime Greenwich UNESCO World Heritage Site.-History:The history of the...

, Avery Hill Campus
SN38 1NW Nationwide Building Society
Nationwide Building Society
Nationwide Building Society is a British building society, and is the largest in the world. It has its headquarters in Swindon, England, and maintains significant administration centres in Bournemouth and Northampton...

SW1A 0PW House of Lords
House of Lords
The House of Lords is the upper house of the Parliament of the United Kingdom. Like the House of Commons, it meets in the Palace of Westminster....

 (Palace of Westminster
Palace of Westminster
The Palace of Westminster, also known as the Houses of Parliament or Westminster Palace, is the meeting place of the two houses of the Parliament of the United Kingdom—the House of Lords and the House of Commons...

; see table above for House of Commons)
SW1W 0DT The Daily Telegraph
The Daily Telegraph
The Daily Telegraph is a daily morning broadsheet newspaper distributed throughout the United Kingdom and internationally. The newspaper was founded by Arthur B...

newspaper (relocated from E14 5DT)
W1D 4FA The Football Association
The Football Association
The Football Association, also known as simply The FA, is the governing body of football in England, and the Crown Dependencies of Jersey, Guernsey and the Isle of Man. It was formed in 1863, and is the oldest national football association...

W1J 5UB UBS Wealth Management
W1N 4DJ BBC Radio 1
BBC Radio 1
BBC Radio 1 is a British national radio station operated by the British Broadcasting Corporation which also broadcasts internationally, specialising in current popular music and chart hits throughout the day. Radio 1 provides alternative genres after 7:00pm including electronic dance, hip hop, rock...

 (Disc Jockey
Disc jockey
A disc jockey, also known as DJ, is a person who selects and plays recorded music for an audience. Originally, "disc" referred to phonograph records, not the later Compact Discs. Today, the term includes all forms of music playback, no matter the medium.There are several types of disc jockeys...

)
W7 1DR Hanwell Health Centre

Automation

The Integrated Mail Processors - IMPs - that Royal Mail use, read the postcode on the item, and translates it into two phosphorous barcodes, unique to the inward and outward parts of the postcode, which the machines subsequently print and read, to sort the mail to the correct outward postcode. Letters may also be sequently sorted by a CSS machine, reading the outward postcode, in the order that a walking postman will deliver, door to door. The top phosphorous barcode is the inward part of the code, whilst the bottom is the outward, on such items.

IMPs can also read RM4SCC items, as used in Cleanmail, a completely different format to the above.

Use by third parties

The PAF
Postcode Address File
The Postcode Address File is a database which contains all known "Delivery Points" and postcodes in the United Kingdom. Buildings which contain several flats or businesses but only one external front door, will only have the external front door listed; the full addresses which include flat...

 is commercially licenseable and is often incorporated in address management software packages. The capabilities of such packages allow an address to be constructed solely from the postcode and house number for most addresses. By including the map reference
Ordnance Survey
Ordnance Survey , an executive agency and non-ministerial government department of the Government of the United Kingdom, is the national mapping agency for Great Britain, producing maps of Great Britain , and one of the world's largest producers of maps.The name reflects its creation together with...

s of postcodes in the address database, the postcode can be used automatically to pinpoint a postcode area on a map. The PAF is constantly updated with around 4,000 postcodes added each month and 2,000 existing postcodes terminated.

Crown Dependencies

The Channel Islands
Channel Islands
The Channel Islands are an archipelago of British Crown Dependencies in the English Channel, off the French coast of Normandy. They include two separate bailiwicks: the Bailiwick of Guernsey and the Bailiwick of Jersey...

 and the Isle of Man
Isle of Man
The Isle of Man , otherwise known simply as Mann , is a self-governing British Crown Dependency, located in the Irish Sea between the islands of Great Britain and Ireland, within the British Isles. The head of state is Queen Elizabeth II, who holds the title of Lord of Mann. The Lord of Mann is...

 established their own postal administrations separate from the UK in 1969. Despite this, when they were subsequently postcoded they adopted the UK format, with Guernsey
Guernsey
Guernsey, officially the Bailiwick of Guernsey is a British Crown dependency in the English Channel off the coast of Normandy.The Bailiwick, as a governing entity, embraces not only all 10 parishes on the Island of Guernsey, but also the islands of Herm, Jethou, Burhou, and Lihou and their islet...

 postcoded in 1993 using area GY, the Isle of Man postcoded the same year using area IM, and Jersey
Jersey
Jersey, officially the Bailiwick of Jersey is a British Crown Dependency off the coast of Normandy, France. As well as the island of Jersey itself, the bailiwick includes two groups of small islands that are no longer permanently inhabited, the Minquiers and Écréhous, and the Pierres de Lecq and...

 postcoded in 1994 using area JE.

British Forces

The British Forces Post Office
British Forces Post Office
The British Forces Post Office provides a postal service to HM Forces, separate from that provided by Royal Mail in the United Kingdom. BFPO addresses are used for the delivery of mail in the UK and around the world...

 (BFPO) is an agency that provides a postal service to HM Forces, separate from that provided by Royal Mail in the United Kingdom. BFPO addresses are used for the delivery of mail in the UK and around the world. BFPO codes such as BFPO 801 serve the same function as postal codes for civilian addresses.

It is based in North West London.

Overseas Territories

Some of the UK's overseas territories have their own postcodes, each postcode covering all addresses in the relevant territory:
Postcode Location
AI-2640 Anguilla
Anguilla
Anguilla is a British overseas territory and overseas territory of the European Union in the Caribbean. It is one of the most northerly of the Leeward Islands in the Lesser Antilles, lying east of Puerto Rico and the Virgin Islands and directly north of Saint Martin...

ASCN 1ZZ Ascension Island
Ascension Island
Ascension Island is an isolated volcanic island in the equatorial waters of the South Atlantic Ocean, around from the coast of Africa and from the coast of South America, which is roughly midway between the horn of South America and Africa...

BBND 1ZZ British Indian Ocean Territory
British Indian Ocean Territory
The British Indian Ocean Territory or Chagos Islands is an overseas territory of the United Kingdom situated in the Indian Ocean, halfway between Africa and Indonesia...

BIQQ 1ZZ British Antarctic Territory
British Antarctic Territory
The British Antarctic Territory is a sector of Antarctica claimed by the United Kingdom as one of its 14 British Overseas Territories. It comprises the region south of 60°S latitude and between longitudes and , forming a wedge shape that extends to the South Pole...

FIQQ 1ZZ Falkland Islands
Falkland Islands
The Falkland Islands are an archipelago in the South Atlantic Ocean, located about from the coast of mainland South America. The archipelago consists of East Falkland, West Falkland and 776 lesser islands. The capital, Stanley, is on East Falkland...

GX11 1AA Gibraltar
Gibraltar
Gibraltar is a British overseas territory located on the southern end of the Iberian Peninsula at the entrance of the Mediterranean. A peninsula with an area of , it has a northern border with Andalusia, Spain. The Rock of Gibraltar is the major landmark of the region...

PCRN 1ZZ Pitcairn Islands
Pitcairn Islands
The Pitcairn Islands , officially named the Pitcairn, Henderson, Ducie and Oeno Islands, form a group of four volcanic islands in the southern Pacific Ocean. The islands are a British Overseas Territory and overseas territory of the European Union in the Pacific...

SIQQ 1ZZ South Georgia and the South Sandwich Islands
South Georgia and the South Sandwich Islands
South Georgia and the South Sandwich Islands is a British overseas territory and overseas territory of the European Union in the southern Atlantic Ocean. It is a remote and inhospitable collection of islands, consisting of South Georgia and a chain of smaller islands, known as the South Sandwich...

STHL 1ZZ Saint Helena
Saint Helena
Saint Helena , named after St Helena of Constantinople, is an island of volcanic origin in the South Atlantic Ocean. It is part of the British overseas territory of Saint Helena, Ascension and Tristan da Cunha which also includes Ascension Island and the islands of Tristan da Cunha...

TDCU 1ZZ Tristan da Cunha
Tristan da Cunha
Tristan da Cunha is a remote volcanic group of islands in the south Atlantic Ocean and the main island of that group. It is the most remote inhabited archipelago in the world, lying from the nearest land, South Africa, and from South America...

TKCA 1ZZ Turks and Caicos Islands
Turks and Caicos Islands
The Turks and Caicos Islands are a British Overseas Territory and overseas territory of the European Union consisting of two groups of tropical islands in the Caribbean, the larger Caicos Islands and the smaller Turks Islands, known for tourism and as an offshore financial centre.The Turks and...



These were introduced because mail was often sent to the wrong place, e.g., St Helena to St Helens
St Helens, Merseyside
St Helens is a large town in Merseyside, England. It is the largest settlement and administrative centre of the Metropolitan Borough of St Helens with a population of just over 100,000, part of an urban area with a total population of 176,843 at the time of the 2001 Census...

, Merseyside
Merseyside
Merseyside is a metropolitan county in North West England, with a population of 1,365,900. It encompasses the metropolitan area centred on both banks of the lower reaches of the Mersey Estuary, and comprises five metropolitan boroughs: Knowsley, St Helens, Sefton, Wirral, and the city of Liverpool...

 and Ascension Island to Asunción
Asunción
Asunción is the capital and largest city of Paraguay.The "Ciudad de Asunción" is an autonomous capital district not part of any department. The metropolitan area, called Gran Asunción, includes the cities of San Lorenzo, Fernando de la Mora, Lambaré, Luque, Mariano Roque Alonso, Ñemby, San...

, Paraguay
Paraguay
Paraguay , officially the Republic of Paraguay , is a landlocked country in South America. It is bordered by Argentina to the south and southwest, Brazil to the east and northeast, and Bolivia to the northwest. Paraguay lies on both banks of the Paraguay River, which runs through the center of the...

. In addition, many online companies would not accept addresses without a postcode. Mail from the UK continues to be treated as international, not inland, and sufficient postage must be used. Royal Mail's Heathrow centre collects all live underpaid mail for surcharging, and there is a reciprocal arrangement with Postal Services around the world to collect. An agreed payment based on volumes is made, year on year. Other forms of postage are collected at local Mail Centres, but Heathrow collects those that still get forwarded to them, that manage to arrive there. Bermuda
Bermuda
Bermuda is a British overseas territory in the North Atlantic Ocean. Located off the east coast of the United States, its nearest landmass is Cape Hatteras, North Carolina, about to the west-northwest. It is about south of Halifax, Nova Scotia, Canada, and northeast of Miami, Florida...

, the UK's most populous remaining overseas territory, has developed its own, entirely separate, postcode system, with unique postcodes for street and PO Box addresses, as have the Cayman Islands
Cayman Islands
The Cayman Islands is a British Overseas Territory and overseas territory of the European Union located in the western Caribbean Sea. The territory comprises the three islands of Grand Cayman, Cayman Brac, and Little Cayman, located south of Cuba and northwest of Jamaica...

 and the British Virgin Islands
British Virgin Islands
The Virgin Islands, often called the British Virgin Islands , is a British overseas territory and overseas territory of the European Union, located in the Caribbean to the east of Puerto Rico. The islands make up part of the Virgin Islands archipelago, the remaining islands constituting the U.S...

. Montserrat
Montserrat
Montserrat is a British overseas territory located in the Leeward Islands, part of the chain of islands called the Lesser Antilles in the West Indies. This island measures approximately long and wide, giving of coastline...

 and Gibraltar
Gibraltar
Gibraltar is a British overseas territory located on the southern end of the Iberian Peninsula at the entrance of the Mediterranean. A peninsula with an area of , it has a northern border with Andalusia, Spain. The Rock of Gibraltar is the major landmark of the region...

 do not have postcodes, although a postcode system has been under consideration in Gibraltar. Postcodes are not used in the Turks and Caicos Islands and the TKCA 1ZZ designation is generally unknown.

Validation

The consequence of the complexity outlined above is that for almost every rule concerning UK postcodes, an exception can be found. Automatic validation of postcodes on the basis of pattern feasibility is therefore almost impossible to design, and the system contains no self-validating feature such as a check digit. Completely accurate validation is only possible by attempting to deliver mail to the address, and verifying with the recipient. Validation is usually performed against a copy of the "Postcode Address File
Postcode Address File
The Postcode Address File is a database which contains all known "Delivery Points" and postcodes in the United Kingdom. Buildings which contain several flats or businesses but only one external front door, will only have the external front door listed; the full addresses which include flat...

" (PAF), which is generated by the Royal Mail
Royal Mail
Royal Mail is the government-owned postal service in the United Kingdom. Royal Mail Holdings plc owns Royal Mail Group Limited, which in turn operates the brands Royal Mail and Parcelforce Worldwide...

 and contains about 27 million UK commercial and residential addresses, covered by more than 1.7 million postcodes. However, even the PAF cannot be relied on as it contains errors, and because new postcodes are occasionally created and used before copies of the PAF can be distributed to users.

It is possible to validate the format of a postcode using the rules described in British Standard BS 7666. In general, the format is one of "A9 9AA", "A99 9AA", "A9A 9AA", "AA9 9AA", "AA99 9AA" or "AA9A 9AA", where A is an alphabetic character and 9 is a numeric character. There are restrictions on the set of alphabetic characters dependent on the position they are in. As can be seen, the first character is always alphabetical and the final three characters are always a numeric character followed by two alphabetic characters. A regular expression
Regular expression
In computing, a regular expression provides a concise and flexible means for "matching" strings of text, such as particular characters, words, or patterns of characters. Abbreviations for "regular expression" include "regex" and "regexp"...

 is given in the comments of the schema, which implements full checking of all the stated BS 7666 postcode format rules. That regular expression can be restated as a "traditional" regular expression:
(GIR 0AA|[A-PR-UWYZ]([0-9]{1,2}|([A-HK-Y][0-9]|[A-HK-Y][0-9]([0-9]|[ABEHMNPRV-Y]))|[0-9][A-HJKPS-UW]) [0-9][ABD-HJLNP-UW-Z]{2})


This can be further reduced, through removal and combination of redundant alternatives and character classes, down to:
(GIR 0AA|[A-PR-UWYZ]([0-9][0-9A-HJKPS-UW]?|[A-HK-Y][0-9][0-9ABEHMNPRV-Y]?) [0-9][ABD-HJLNP-UW-Z]{2})


NB: British Forces Post Office
British Forces Post Office
The British Forces Post Office provides a postal service to HM Forces, separate from that provided by Royal Mail in the United Kingdom. BFPO addresses are used for the delivery of mail in the UK and around the world...

 postcodes do not follow the BS 7666 rules, but have the format "BFPO NNNN" or "BFPO c/o NNNN", where NNNN is 1 to 4 numerical digits.

An alternative short regular expression from BS7666 Schema is:
[A-Z]{1,2}[0-9R][0-9A-Z]? [0-9][ABD-HJLNP-UW-Z]{2}


The above expressions fail to exclude many non-existent area codes (such as A, AA, Z and ZY). A more refined regex, which excludes all invalid areas and some invalid districts is:
(GIR 0AA)|(((A[BL]|B[ABDHLNRSTX]?|C[ABFHMORTVW]|D[ADEGHLNTY]|E[HNX]?|F[KY]|G[LUY]?|H[ADGPRSUX]|I[GMPV]|JE|K[ATWY]|L[ADELNSU]?|M[EKL]?|N[EGNPRW]?|O[LX]|P[AEHLOR]|R[GHM]|S[AEGKLMNOPRSTY]?|T[ADFNQRSW]|UB|W[ADFNRSV]|YO|ZE)[1-9]?[0-9]|((E|N|NW|SE|SW|W)1|EC[1-4]|WC[12])[A-HJKMNPR-Y]|(SW|W)([2-9]|[1-9][0-9])|EC[1-9][0-9]) [0-9][ABD-HJLNP-UW-Z]{2})


The preceding expression also matches the legacy GIR 0AA and the new BX non-geographic postcodes.

Mailsort

Because postcodes are assigned mnemonically, and are intended to be permanent, they do not make it easy to group items together into operationally significant blocks. They have therefore been supplemented by a newer system of five-digit codes called Mailsort
Mailsort
Mailsort is a five-digit address-coding scheme used by the Royal Mail and its business customers for the automatic direction of mail...

. These encode the first (outward) half of the postcode in a way that is useful for mail routing - e.g. a particular range of mailsort codes go on a particular plane or lorry.

Mail users who send 'a minimum of 4,000 letter-sized items'. receive a discount if they deliver mail to the post office split up by Mailsort code (delivery sorted by postcode provides no such incentive). These mail users will be supplied with a database to allow them to convert from postcodes to mailsort codes.

Non-postal uses and economic aspects

While postcodes were introduced to expedite the delivery of mail, they are very useful tools for several other purposes, particularly because codes are very fine-grained and identify just a few addresses. Among uses are:
  • Finding the nearest branch of an organisation to a given address. A computer program uses the postcodes of the target address and the branches to list the closest branches in order of distance as the crow flies (or, if used in conjunction with streetmap software, road distance). This can be used by companies to inform potential customers where to go, by job centres to find jobs for job-seekers, to alert people of town planning applications in their area, and a great many other applications.
  • Postcodes can be used with satellite navigation systems to navigate to an address by street number and postcode.
  • Postcodes are used by non-life insurance companies to assess premiums for motoring/business/domestic policy premiums.
  • Postcodes are used by life insurance companies and pension funds to assess longevity for pricing and reserving.

Availability

The availability of postcode information has significant economic advantages. the Royal Mail was licensing use of the postcode database for a charge of about £4000 per year. Following a Government consultation, on 1 April 2010 Ordnance Survey released co-ordinate data for all Great Britain
Great Britain
Great Britain or Britain is an island situated to the northwest of Continental Europe. It is the ninth largest island in the world, and the largest European island, as well as the largest of the British Isles...

 postcodes (but not their address elements) for re-use free of charge under an attribution-only licence, as part of OS OpenData.

See also

  • List of postcode areas in the United Kingdom
  • List of postal codes (around the world)
  • ACORN
  • Address Point
  • Postcode lottery
    Postcode lottery
    In the United Kingdom, the term postcode lottery refers to the way the allocation of postcodes, which often bears little relation to local government boundaries, can affect such things as insurance prices...

  • RM4SCC
    RM4SCC
    RM4SCC is the name of the barcode symbology used by the Royal Mail for its Cleanmail service. It enables UK postcodes as well as Delivery Point Suffixes to be easily read by a machine at high speed....

    —a machine-readable barcode version of the postcode

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK