I recently had to add a country selection list on a form on the website of a customer who does business internationally, and couldn’t find an up-to-date, easy-to-use list of countries already available. The closest was the ISO 3166 country list (HTML version here), but there are a few issues with it in my opinion:
- Country names are all capitalized, which makes them a bit harder to read (UNITED ARAB EMIRATES vs United Arab Emirates for example)
- They list official country names, which can sometimes be quite long even in their “short” version, such as MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF.
I therefore took their latest list of 249 countries (as of February 2012) and fixed the capitalization/shortened the names of a few countries to more usual ones (e.g. Macedonia instead of MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF). I did the same with the list of French country names and merged the English and French lists together, resulting in a table with the following 3 columns:
- ISO 3166 country code
- English Name
- French Name
These are free for everyone to download and redistribute. I hope it saves you some time.
Downloads – files last updated 2014-06-29
ISO 3166 country code/country name list – SQL format (creates an InnoDB table named countries with MySQL syntax)