Download UK Postcodes with Latitude and Longitude
Download a list of UK out code postcodes with their latitude and longitude coordinates.
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 1812402 full postcodes (out code + in code).
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
Outcode Postcodes Current List : 2974
Full UK Postcode Current List : 1812402
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
Full UK Postcode Latitude Longitude Download
- MSSQL ukpostcodesmssql.zip (32MB zipped, 228MB unzipped)
- Uses a table called [postcodelatlng]
- Script to create table ukpostcodes_tablemssql.sql (1 KB)
- MySQL ukpostcodesmysql.zip (37MB zipped, 234MB unzipped)
- Uses a table called postcodelatlng
- Script to create table ukpostcodes_tablemysql.sql (1 KB)
- CSV ukpostcodes.zip (33MB zipped, 96MB unzipped)
- Header is in the first row : id,postcode,latitude,longitude
Outcode Area Postcodes (AB1,B2,BT7 etc..)
- MSSQL postcode-outcodes-mssql.sql (293 KB)
- Uses a table called [postcodelatlng]
- Script to create table postcode-outcodes_tablemssql (1 KB)
- MySQL postcode-outcodes-mysql (280 KB)
- Uses a table called postcodelatlng
- Script to create table postcode-outcodes_tablemysql.sql (1 KB)
- CSV postcode-outcodes.csv (82 KB)
- Header is in the first row : id,outcode,latitude,longitude
Contains Ordnance Survey data © Crown copyright and database right 2016
Contains Royal Mail data © Royal Mail copyright and database right 2016
Contains National Statistics data © Crown copyright and database right 2016
Using This Data
To import to a web based MySQL database we would recommend BigDump: Staggered MySQL Dump Importer
- MySQL UK post code table with corresponding longitude and latitude
- Calculating the distance between a set of postcodes and ranking them in order
- 11th August 2016 - Updates to B9 4AU, MK11 4AL & DN189AH
- 22nd July 2016 - Updates to SW11 7AS, EX6 9AA, EN77 & WV98
- 16th November 2015 - November 2015 update
- 19th October 2015 - Removed some duplicates
- 23rd September 2015 - Postcode column now has a space in the appropriate place
- 7th May 2015 - Some no loner used postcodes removed. Around 3000 corrections based on feedback
- 29th April 2015 - New update engine in place. Now provides MS SQL and MySQL script
- 5th March 2015 - Added B37 7FP
- 16th July 2014 - Added BB12 7BF
- 9th February 2014 - Added S1 4DE
- 9th February 2014 - Updated Full postcode list. 222 duplicates removed
- 9th February 2014 - Updated Outcode data. SQL script is for MSSQL
- 20th January 2014 - Removed 2 rows of incorrect data. Rows 1699835 and 1699836
- 11th September 2013 - Removed Duplicate BD98 And M60
- 1st August 2013 - Added full postcode list CSV and SQL (SQL insert) format with 1703751 rows
- 15th September 2011 - Added E20 (Olympic Park Postcodes)
- 23rd February 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
- 27th June 2009 - Added NR7
- 22nd October 2008 - Added some Isle of Man and Jersey Postcodes. XLS format is no longer provided.
- 24th August 2008 - Added some new postcodes
- 1st July 2008 - Added List Status
- 10th June 2008 - Added SQL, CSV and XLS formats each with 2821 rows
Previous Comments For This Page
Hi, great site. Am I allowed to use the post code data in my professional work? Are there any limitations on using this data for clients?
By Oliver on 28th September 2016
Hi James, no, not at hand. Its a case of taking the large postcode file and applying a filter.
By Free Map Tools on 7th September 2016
Hi, Do you have a file of lat and long by sector ie "HX3 9"
Thanks in advance
By James on 7th September 2016
Beua, I suggest using one of the contact methods on this page : http://www.royalmail.com/personal/receiving-mail/update-your-address
By Free Map Tools on 5th September 2016
Hi, do you know any way of getting the lap/long of a UK postcode changed? We are in a very rural location and the postcode covers a wide area. However as the postcode centre is at the end of our private track we get everything including HGVs arriving here! If we could change it to the end of our lane where there are signs delivery drivers might then look at the signs.
Thanks in advance.
By Beau on 5th September 2016
Hi Francisco, we will get back to you and give feedback once we have done some tests and checks. The data is sourced from official sources and updated regularly.
By Free Map Tools on 10th August 2016
I found around 650 postcode with wrong coordinates comparing with other table that I had, how good is this data?
some postcode examples B9 4AU, MK11 4AL, PH33 9AF . Thank you anyway for this fantastic site.
By Francisco on 9th August 2016
I matched your postcodes to a query I had which contained over 70k rows. Out of them 70k post codes there was only 150 missing. That's pretty amazing. Thanks!
By Danny on 21st July 2016
I've matched your postcodes amongst a huge amount of records and found that this table is missing around 4,000 of the 70,000 records matched. If you would like a dump of the codes email me cro****k
By Daniel on 21st July 2016
Dave, thanks for the feedback. I agree with what you have found. WV98 and EN77 are non-geographic postcodes so they should really have no lat/lng associated with them rather than the current idea of "put them in the bottom left corner". I would rather still have them included in the table to allow validation, but set their lat/lng to null or empty value instead. This is a change that will be getting applied soon. As for MK11, I'm not sure what you mean? Is there a entry just for MK11 that is in the wrong position?
By Free Map Tools on 27th June 2016
Hi, Great Resource. I'm a bit confused about some of the postcodes though.Certain postcodes seem to have identical lat-lon even though the postcodes are different. For instance anything listed WV98 or EN77(or the single MK11 have a lat lon of 49.76682/-7.557163. EN77 should be Enfield, I think, and WV should be Wolverhampton, but those lat lon seem to be pointing off the coast of cornwall? Are these reserved for later use? The postoffice website doesn't recognise most of those postcodes.
By Dave on 27th June 2016
This is a fantastic site! Thank you so much.
By Frederick on 8th May 2016
great tool. Is there anyway to search for multiple postcodes at a time?
On 11th April 2016
Thank i realy enjoy working here
By GLEN EIGEN on 18th February 2016
Hi, you can find the download links just below where is says "Full UK Postcode Latitude Longitude Download", about mid way down the page.
By Free Map Tools on 8th February 2016
Good but how does one download it? I can see no instructions
On 8th February 2016
Hi Daniel, the point is an estimated center point of the postcode area.
By Free Map Tools on 1st February 2016
Hi Great resource by the way. What point in the postcode area do the longitude and latitude represent. Thanks
By Daniel O'Hara on 1st February 2016
looking for this exact list, but with town names too?
By mm on 14th January 2016
Hi Bill, do you mean postcodes that are no longer in use (terminated)?
By Free Map Tools on 24th December 2015
Showing the most recent 20 out of 197 comments. Click to see all the comments.
Add your own comment below and let others know what you think: