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 : 2837 Postcodes
Total Possible : 2971 Postcodes
Number of missing postcodes : 134
Unknown Postcodes
- JE1
- JE4
- IM1
- IM2
- IM3
- IM4
- IM5
- IM6
- IM7
- IM8
- IM9
- EX25
- EX26
- EX27
- EX28
- EX29
- EX30
- G16
- G17
- G18
- G19
- MK20
- MK21
- MK23
- MK24
- MK25
- MK27
Downloads
- SQL postcodes.sql (112 KB)
- CSV postcodes.csv (100 KB)
- XLS postcodes.xls (442 KB)
Relevant Links
- 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
Previous Comments For This Page
Well, I can't help get the Lat, Long, But using the list I have put together a ROUGH php/MySQL area search...
As the list gets better (and my code gets better) I would be happy to release it...
By Andy on 27/08/2008
Andy, you are right - they are wrong. I have moved these out to the Unknown Postcodes section. If anyone can help find the lat / long of these then please get in contact.
By Free Map Tools on 26/08/2008
I think the list has issues
"2829","EX25","37.761138","-122.415997"
"2830","EX26","37.79278","-122.403560"
"2832","EX28","37.388458","-121.941138"
"2833","EX29","37.761138","-122.415997"
"2834","EX30","37.761138","-122.415997"
"2835","G16","37.405717","-121.917788"
"2836","G17","37.499014","-122.214431"
"2837","G18","37.405717","-121.917788"
"2838","G19","37.405717","-121.917788"
"2839","MK20","37.411898","-122.144810"
"2840","MK21","37.986939","-122.587932"
"2842","MK23","37.391812","-121.912140"
"2843","MK24","37.499752","-122.213602"
"2844","MK25","37.416122","-122.144852"
"2846","MK27","37.531975","-122.261544"
"2850","IM1","37.386657","-122.064200"
"2851","IM2","37.791513","-122.398530"
"2852","IM3","37.791513","-122.398530"
"2853","IM4","37.704794","-122.462532"
"2854","IM5","37.3854","-121.921242"
"2855","IM6","37.704794","-122.462532"
"2856","IM7","37.551665","-122.061313"
"2857","IM8","37.386657","-122.064200"
"2858","IM9","37.55548","-122.067314"
"2859","JE1","37.787789","-122.423509"
Those don't look right????
By Andy on 26/08/2008
Hi there,
Thanks for this, it is very useful. My TomTom puts up the co-ordinates for any postcode, eg MK22 N 51d59.733min W0d43.58min. Would you like me to provide the missing ones..? Im sure you have access to this information anyway.
Thanks
Rolf
By Rolf on 11/08/2008
Also missing from the list:
IM (Isle Of Man)
JE (Jersey)
GY (Guernsey)
NR8 (Norwich)
CB21-25 (Cambridge)
By CG on 30/07/2008
Sorry, cant provide the PHD, but here are 2 good pages on the theory...
http://en.wikipedia.org/wiki/Haversine_formula
http://mathforum.org/library/drmath/view/51879.html
Use the formula on the second page to build an Excel formula...
By Leigh R on 28/07/2008
Once you have the lat and long you calculate the straight line distance (great circle) as shown here: http://www.movable-type.co.uk/scripts/latlong.html
By Steve on 23/07/2008
Does anyone have an Excel tool to do the calculation. It would be really useful. Thanks
By Shaun on 09/07/2008
Thanks Paul. Even if you supply the postcodes I can work out the coordinates and update the list.
By Free Map Tools on 01/07/2008
Your list seems to be incomplete! I have found 480 missing cords. Examples: DN23-30,EX25-30,G16-19, MK20-30. I need to find these out so if I get the data, I will pass it on!
By Paul M on 01/07/2008
Can someone tell me how you would use the above download to calulate the distance between one postcode to another using excel ie. calulate SE2 to SE25? It seems to me that you would need to have a PHD to work that out!
On 14/06/2008
Add your own comment below and let others know what you think:
