How do UK telephone numbers work?

The UK telephone numbering system has a strange and complicated pattern which is born out of many historical changes and anomalies. Essentially nearly all numbers start with 0 when dialled in the UK. The leading 0 is omitted when calling from overseas and the prefix "+44" is added in its place. The second digit indicates what type of number it is. So called geographic numbers (those associated with an area code) start with 01or 02. Numbers starting with 03 are not associated with any area code but are charged at the same rates as numbers beginning with 01 or 02. Mobile numbers always start with 07. Numbers starting 09 are premium rate numbers which incur high charges for providing additional services.  Numbers starting with 080 are toll free. Other numbers starting with 08 are charged at special rates but not the very high rates for 09 numbers.

Special numbers that do not start with 0 include 999 and 112 for emergencies, 101 for non emergency Police matters, 111 for contacting the National Health Service in a non emergency and directory enquiries services that start with 118.

The history of UK area codes (beginning 01 and 02) dates back to the times when individual telephone exchanges had their own one, two or three character Subscriber Trunk Dialing (STD) codes (e.g. B for Birmingham or AY6 for Aylesbury). in 1966 STD codes were converted to numbers using the number patterns on telephone dials (where 2=ABC, 3 = DEF etc.) so Birmingham became 021, Aylesbury became 0296. 01 was the code allocated to London. Area codes were between 2 and five characters long including the leading zero. Following the area code a local number of between 3 and 7 digits was added for each line to make the complete number either 9 or 10 digits long. Callers within the same area code could dial other lines with the same code by simply dialling the local number omitting the area code. In 1968 area codes beginning 00 were moved to free up 00 for other uses.

By the 1980s a number of factors meant that some areas, especially London, were running out of codes. Various measures were introduced including, in 1990,  the splitting of London into 071 (inner London) and 081 (outer London).

The 80s and 90s also saw the gradual introduction of "non geographic" numbers e.g. the toll free 0800 numbers and a number of patterns for emerging mobile services. Premium rate services were also launched using 0898.

In 1995 on so called "phONEday" a leading 1 was added after the zero. London numbers became either 0171 or 0181, Birmingham 0121, Aylesbury 01296 etc.

This established the pattern we see today allowing for some area codes to move to "02" codes over the next few years. In addition larger cities were allocated new codes beginning 011 e.g. 0113 for Leeds, 0117 for Bristol.

In 2000 the "big number change" saw London codes changed yet again = 0171 became 020 7 and 0181 became 020 8 allowing for new London numbers to be issued starting with 020 3 and 020 4 . Other cities that gained "02" style codes were Southampton/Portsmouth 023 , Coventry 024 and Cardiff 029.  A unified code of 028 was introduced in Northern Ireland.