The table, which ranked areas based on crime, jobs and health was carried out to celebrate the 40th anniversary of the allocation of postcodes to every address in Britain, which the Royal Mail said had ‘revolutionised’ the way post was both sorted and delivered.
Top of the list overall was SP9 - Tidworth, in Wiltshire - closely followed by the village of Yateley in Hampshire (GU46) and St Bees in Cumbria (CA27).
South Glasgow - G44 - was closely followed by Erskine (PA8) and Largs (KA30) in Scotland.
Brynteg on Anglesey (LL78) took first place among Welsh postcodes, followed by Llantwit Major (CF61) and Llanidloes (SY18).
Steve Rooney, head of Royal Mail’s address management unit, said: “The invention of the postcode revolutionised the way post is sorted and delivered. As it has evolved, the postcodes have also revolutionised the way companies do business.
“The postcode is now used by businesses and individuals in their everyday activities, whether that is verifying a person’s address when making a transaction or planning a route on a sat-nav system.”
There are around 1.8 million postcodes across the UK, covering 29 million addresses.
The study by the Centre for Economic and Business Research calculated the most desirable postcodes based on a range of factors including employment opportunities, health, education, crime rates and housing affordability.