Download UK Postcodes with Latitude and Longitude
Download a list of UK out code postcodes with their latitude and longitude coordinates.
Introduction
The UK postal system uses postcodes to help with automating the sorting and delivery of mail. This is made up of a 2-part code, an out code and an in code. As the out code is the most significant part of the system, it can be used to obtain a rough area level break up of the UK. There are approximately 2971 out codes and approximately 1762460 full postcodes (out code + in code). These downloads provide a list of most of the out codes with their associated latitude and longitude.
Purpose
The uses of these out codes and lat/long values include mapping applications such as:
- Rough distance calculation
- Plot the rough location of a postcode on a map
- Simple postcode validation for input forms
List Status
Current List : 2973 Postcodes
Total Possible : 2971 Postcodes
Number of missing postcodes : 0
Postcodes To Add
- DH11, DH12, DH13, DH14, DH15, DH16
Non Geographic Postcodes
AB99, BT58, CA99, CM92, CM98, CR44, CR90, GIR, IM99, IV99, JE5, M61, ME99, N1C, N81, NR99, NW26, PA80, PE99, RH77, SL60, SO97, SW95, SY99, WD99, WF90
Downloads
- SQL postcodes.sql (118 KB)
- CSV postcodes.csv (82 KB)
Relevant Links
- https://www.ordnancesurvey.co.uk/opendatadownload/products.html
- http://en.wikipedia.org/wiki/Haversine_formula
- http://mathforum.org/library/drmath/view/51879.html
- http://www.movable-type.co.uk/scripts/latlong.html
Version History
- 10/06/2008 - Added SQL, CSV and XLS formats each with 2821 rows
- 01/07/2008 - Added List Status
- 24/08/2008 - Added some new postcodes
- 22/10/2008 - Added some Isle of Man and Jersey Postcodes. XLS format is no longer provided.
- 27/06/2009 - Added NR7
- 23/02/2011 - Added AB24, B99, BB94, BD97, BD98, BD98, BD99, BL11, BL78, BN50, BN51, BN52, BN88, BN99, BS80, BS98, CA95, CF30, CF91, CF95, CF99, CH25, CH26, CH27, CH28, CH29, CH30, CH31, CH32, CH33, CH34, CH70, CH88, CH99, CM77, CM99, CR9, CT50, CW98, DE99, DH97, DH98, DH99, DN55, E77, E98, EC1P, EC2P, EC4P, EC50, EH91, EH95, EH99, FY0, G58, G70, G75, G79, G9, G90, GU95, IP98, KY99, L67, L68, L71, L72, L73, L74, L75, LE19, LE21, LE41, LE55, LE87, LE94, LE95, LS88, LS98, LS99, M50, M60, M99, MK77, N1P, NE82, NE83, NE85, NE88, NE92, NE98, NG70, NG80, NG90, NW1W, OL95, PL95, PR0, PR11, S49, S96, S97, S98, S99, SA80, SA99, SE1P, SL95, SN38, SN99, SS22, SS99, ST55, SW99, TR93, UB18, W1A, WA55, WA88, WR78, WR99, YO90, YO91
- 15/09/2011 - Added E20 (Olympic Park Postcodes)
Previous Comments For This Page
Is it possible to extend this list to include all long lats for postal sectors ie. AB10 1, AB10 2 etc
By eddie on 02/12/2011
The public code point data contains eastings and northings not latitude and logitude but there is a php library phpcoord-2.3.php that will provide the necessary conversions. The current data does not include all the recent post code changes so is not up to date.
By M B on 26/09/2011
DOn't forget to add the new Postcode for the Olympic Park and Stadium in Stratford East London. E20
On 14/09/2011
Does anyone know if it is possible to convert postcodes to lat longs in batches of say 100 as opposed to individually?
By Steve on 06/09/2011
thanks it was a great help
On 24/06/2011
Excellent resource - thanks.
Two postcodes are duplicated though: BD98 and M60. BD98 has the same lat/long for each but M60 has different lat/longs.
By lucyconnuk on 26/05/2011
AFAIK the public Code-Point data currently available does not include postcode latitude and longitude (which can be directly consumed by Google Earth/Maps), but only only includes Ordinance Survey grid references (which can't).
I believe the same applies to Royal Mail's commercially available data.
I'm not certain about Ordinance Survey's commercially available data.
Anyone shed any further light on this?
Cheers
By Peter I on 21/04/2011
A fantastic effort with this list - I have used it successfully on my website. Thank you!
By William on 16/03/2011
CM77 missing,
keep up the good work! Many Thanks!
By jim on 20/01/2011
Hi It appears to be missing Cardiff CF1-CF9 any chance you could tell me how to calculate the references? thanks
By vin on 18/01/2011
Dear Tina (04/12/2010)
It must be SW1Y 4PD
which is the postal code of
British Petroleum Company UK
1 St James's Square
London SW1Y 4PD
By Peter Croydon on 12/12/2010
You can new get full postcode to long and lat for free for os survey open site
By John on 07/12/2010
I have a postcode but I cannot find it xw1y4pd
By Tina on 04/12/2010
I have got a customer that has give AB24 as a postcode but I cannot find it on this list.
By Kelly on 26/11/2010
Works a treat from what I have found. Also got the following code to calculate the distances so definitely sorted: http://www.freevbcode.com/ShowCode.asp?ID=5532 Cross checked to Google maps and seems within the right ball park. Works great for seeing which of our customers are closest to a set location
On 18/11/2010
Hi, when i calculate distance between ng31 8ge and ng31 9rt it says 0 distance
when i use the map provided in this site it shows the distance can you please advise
By Taqi Ahmed Taha on 21/10/2010
its cool
By lewis on 05/10/2010
Great!!!
By Andrew Xu on 23/09/2010
Hi, we have downloaded the code-point product and did find the co-ordinates. However, this presentation seems more digestible.
By Free Map Tools on 02/06/2010
Thanks for the update, but which product is it? The code-point list does not contain lat/long coordinates. Thanks again.
On 02/06/2010
Showing the most recent 20 out of 61 comments. Click to see all the comments.
Add your own comment below and let others know what you think:
