UK Postcodes

Finding grid coordinates from area codes

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:

Map of postcodes

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/.