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 1762460 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
Current List : 2973 Outcode Postcodes
Total Possible : 2971 Outcode Postcodes
Number of missing outcode postcodes : 0
Current List : 1703526 Postcodes
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
- SQL fullukpostcodes.zip (45MB zipped, 626MB unzipped)
- CSV postcodes.zip (31MB zipped, 87MB unzipped)
Contains Ordnance Survey data © Crown copyright and database right 2013
Contains Royal Mail data © Royal Mail copyright and database right 2013
Contains National Statistics data © Crown copyright and database right 2013
- 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)
- 01/08/2013 - Added full postcode list CSV and SQL (SQL insert) format with 1703751 rows
- 11/09/2013 - Removed Duplicte BD98 And M60
- 20/01/2014 - Removed 2 rows of incorrect data. Rows 1699835 and 1699836
- 09/02/2014 - Updated Outcode data. SQL script is for MSSQL
- 09/02/2014 - Updated Full postcode list. 222 duplicates removed
- 09/02/2014 - Added S1 4DE
Previous Comments For This Page
Just loading in the data now, I think this will be really useful. For others that are trying to use this on an MS SQL server and finding that it won't load because of the size you might find this helps: sqlcmd -S (server name) -i C:\(file name).sql -o Taken from this thread: http://stackoverflow.com/questions/431913/how-do-you-run-a-300mb-ms-sql-sql-file
Thanks for reporting, these have been removed.
By Free Map Tools on 20/01/2014
Very useful, but it has an odd entry:
What is that?
Hi, There are more than 1.7M lines (postcodes) in the full CSV file and that number looks like the Excel limit so yes, I would assume Excel is unable to open the file in full and is cutting off rows.
By Free Map Tools on 07/01/2014
The CSV list I downloaded only goes upto 1,048,576 and misses all the C-G post codes. Is this because of excel having limited space?
By BennyHill on 07/01/2014
for christmas i want aiphone 5
great job many many many thanks ;)
After trying a few different encodings, I found ISO8859 worked for me. It would be good to know what it was encoded in though.
By Arthur on 13/11/2013
What is the character encoding for the CSV file?
By Arthur on 13/11/2013
By Webby on 26/10/2013
Even 1 San Fran Long Lat in the list post code 43.. !
Seems a few dud entries exist. Maybe a postcode verification tool would be useful. Also a column to state if postcode is no longer in use and what it has been replaced with.. Entries that are clearly not full postcodes yet found in sql are: AB10 BT36 WV5 ST10 BT93 BT94 47 CH43 SR7 SR8 CM20 RH1 DY6 DH6
Great resource.. Thanks!
It seems however there are 43764 postcodes missing compared to Code Point open. and 62373k that are in this not in codepoint.
In the full postcode list CSV file, there are over 5000 postcodes with the co-ordinates "49.766805724377600, -7.557159803639920". This is somewhere in the ocean off the coast of the UK.
By Sam Anthony on 01/10/2013
MySQL found 22 duplicates when loading. They are ignored if you have created indexes. Fab resource though.
By Jonathan on 26/09/2013
Great resource thank you :) Is there any chance of getting the Postcode areas they fall into included in the download please? eg The Midlands, South East England etc or can you point me in the direction of where to find this kind of document?
Thanks so much. :)
By Jess on 26/09/2013
This is superb. Thanks a lot.
Thank you for the lists. Now I can add a 'distance to/from' :)
By Matt on 21/09/2013
Thanks M. Updates made.
By Free Map Tools on 11/09/2013
just a note that in the outcode csv file there duplicate entries for m60 where there are different values for lat/lng and bd98 where the values are the same.
By M on 11/09/2013
Showing the most recent 20 out of 106 comments. Click to see all the comments.
Add your own comment below and let others know what you think: