UK Postcodes

Finding grid coordinates from area codes


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:

 - 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 Jonathan's Java package to convert between GB grid references and latitude and longitude and vice-versa is now available from


Search this site


Copyright Paul Mutton 2001-2013
Feedback welcomed

Web Hosting

Web Hosting