Download National Public Transport Gazetteer (NPTG) data
You can download the names and geographical data for all cities, towns, villages and other localities in Great Britain (England, Scotland and Wales). This does not include Northern Ireland.
This data contains all localities in CSV (6MB) or XML (34MB) format.