I'm planning on doing this conversion soon, I intended to use the following C# library as a SQL Server CLR function, but I probably would've used breasal (or something similar) if I was using Linux:
Another good source of UK Postcode data is doogal.co.uk. The author (Chris Bell) combines the Codepoint Open dataset with other ones from the ONS; that gives a more comprehensive list of postcodes (including ones that are no-longer in use and codes in Northern Ireland and the Isle of Man).
In his datasets he's already done the conversion to regular lat/lon.
I'm planning on doing this conversion soon, I intended to use the following C# library as a SQL Server CLR function, but I probably would've used breasal (or something similar) if I was using Linux:
https://code.google.com/p/geocoordconversion/
For anyone who wants to use this C# library, worth reading this:
http://webcache.googleusercontent.com/search?q=cache:er_vqaK...