UK Postcodes

Finding grid coordinates from area codes

Download: postcodes.zip

15 May 2004: corrected some mistakes in postcode locations.
25 Feb 2004: added 339 new postcodes.

With no guarantees to its accuracy, here you can download a list of UK postcode area codes and their grid coordinates. There are now 2821 area codes in the list. Let me know if you think there are any missing area codes.

Free list of UK postcodes

The list is formatted as plain text, with each record on a separate line. Each record consists of five fields, each field being separated by a comma. You should be able to import this data into most applications that support "comma separated variables". The five fields are:

  1. First part of the UK postcode (area code)
  2. x-coordinate (metres)
  3. y-coordinate (metres)
  4. Latitude
  5. Longitude

File format

This is the format used in postcodes.csv:

areacode,x,y,latitude,longitude
AB10,392900,804900,57.135,-2.117
AB11,394500,805300,57.138,-2.092
AB12,393300,801100,57.101,-2.111
AB13,385600,801900,57.108,-2.237
AB14,383600,801100,57.101,-2.27
AB15,390000,805300,57.138,-2.164
AB16,390600,807800,57.161,-2.156
 - etc -

Map of postcodes

All area codes from this file, plotted to form a skeleton map:

uk map

The nicest use of this data I've seen so far is the VIP map on the Virgin Radio web site.

Thanks to William Platts for the OS grid reference data, Jonathan Stott for the latitudes and longitudes, and Jon Godwin for detecting and correcting some locations.

Grid reference conversions

Jonathan Stott says: "Conversion between latitude/longitude and grid references is not as simple as one would expect. Indeed, the maths involved is rather complex and not really for the faint-hearted!" The Ordnance Survey are nice enough to publish the convoluted formulae on their website (which you can see if you have a look at http://www.gps.gov.uk/guidecontents.asp). Jonathan's Java package to convert between GB grid references and latitude and longitude and vice-versa is now available from http://www.jstott.me.uk/coord/.

 

Search this site

 

Copyright Paul Mutton 2001-2013
http://www.jibble.org/
Feedback welcomed
email

~
Dreamhost
Web Hosting

~
Dreamhost
Web Hosting