which uses browser location finding to tell you what postcode you are in (more or less). If you'd be interested, I have a beta API which will return full postcode info based on latitude/longitude; it's kind of beta, but I'd be happy to provide access if you need it.
CodePoint Open has been freely available for a number of years. It doesn't include delivery endpoints but for geolocating English, Scottish and Welsh (but, alas, not Northern Irish) postcodes it's fine.
Unfortunately we lost the postcode database as a public asset in 2013 when the UK government sold off Royal Mail[0], despite the database being compiled at huge cost to the tax payer.
This is a real shame as people had to campaign for years before the data was made freely available to begin with.[1]
Hopefully though, as long as the government still holds a large stake, we'll at least have Code Point. The Royal Mail also offer some developer options[2]
Actually, zip codes are proprietary business information of the USPS. Which is why ZipLocate uses ZCTA codes (similar, but based on data collected from censuses).