How hard would it be to simply have a text list of all countries in the world that you could use to just cut and paste for a drop-down list? I was just in the middle of creating a cck node for countries and wanted a quick list I could cut and paste from without having to muck about with doing search/replace work to get rid of the side data from Wikipedia or the UN's list of countries. I wanted a similar list for states & provinces in North America, so just added that.The Wikipedia list also has lists of the states lacking general international recognition, of which Taiwan & Palestine are likely the most hotly contested.
My friend Jason Ramsey pointed out on Facebook (when my rss feed migrated there) that there were some other options, looking at "the perl cpan module Geography::Country you will notice that they use the ISO 3166-1 list which I searched for and found this list. Then you can easily do a regex to strip off the country code. Or there is also this easy to use list tool. I took the output from this and formatted it nicely for use in cck's select forms (one value per line - key|label.) & the survey module (A list of all options - delimited by semicolons & colons - 1:red;2:blue;3:green).
It is useful to have a drop-down that returns a country code so that this can be consistently stored with your client's address. If you do need support with user input forms, please feel contact us.
I've cleaned up one source of 195 countries and have it here for future reference:
Afghanistan
Albania
Algeria
Andorra
Angola
Antigua & Deps
Argentina
Armenia
Australia
Austria
Azerbaijan
Bahamas
Bahrain
Bangladesh
Barbados
Belarus
Belgium
Belize
Benin
Bhutan
Bolivia
Bosnia Herzegovina
Botswana
Brazil
Brunei
Bulgaria
Burkina
Burundi
Cambodia
Cameroon
Canada
Cape Verde
Central African Rep
Chad
Chile
China
Colombia
Comoros
Congo
Congo {Democratic Rep}
Costa Rica
Croatia
Cuba
Cyprus
Czech Republic
Denmark
Djibouti
Dominica
Dominican Republic
East Timor
Ecuador
Egypt
El Salvador
Equatorial Guinea
Eritrea
Estonia
Ethiopia
Fiji
Finland
France
Gabon
Gambia
Georgia
Germany
Ghana
Greece
Grenada
Guatemala
Guinea
Guinea-Bissau
Guyana
Haiti
Honduras
Hungary
Iceland
India
Indonesia
Iran
Iraq
Ireland {Republic}
Israel
Italy
Ivory Coast
Jamaica
Japan
Jordan
Kazakhstan
Kenya
Kiribati
Korea North
Korea South
Kosovo
Kuwait
Kyrgyzstan
Laos
Latvia
Lebanon
Lesotho
Liberia
Libya
Liechtenstein
Lithuania
Luxembourg
Macedonia
Madagascar
Malawi
Malaysia
Maldives
Mali
Malta
Marshall Islands
Mauritania
Mauritius
Mexico
Micronesia
Moldova
Monaco
Mongolia
Montenegro
Morocco
Mozambique
Myanmar, {Burma}
Namibia
Nauru
Nepal
Netherlands
New Zealand
Nicaragua
Niger
Nigeria
Norway
Oman
Pakistan
Palau
Panama
Papua New Guinea
Paraguay
Peru
Philippines
Poland
Portugal
Qatar
Romania
Russian Federation
Rwanda
St Kitts & Nevis
St Lucia
Saint Vincent & the Grenadines
Samoa
San Marino
Sao Tome & Principe
Saudi Arabia
Senegal
Serbia
Seychelles
Sierra Leone
Singapore
Slovakia
Slovenia
Solomon Islands
Somalia
South Africa
Spain
Sri Lanka
Sudan
Suriname
Swaziland
Sweden
Switzerland
Syria
Taiwan
Tajikistan
Tanzania
Thailand
Togo
Tonga
Trinidad & Tobago
Tunisia
Turkey
Turkmenistan
Tuvalu
Uganda
Ukraine
United Arab Emirates
United Kingdom
United States
Uruguay
Uzbekistan
Vanuatu
Vatican City
Venezuela
Vietnam
Yemen
Zambia
Zimbabwe
| Attachment | Size |
|---|---|
| country_code_drupal.txt (updated) | 3.52 KB |
| country_code_drupal_survey.txt (updated) | 3.52 KB |


You just saved me a ton of
Thanks Mate
Gibraltar
Interesting Place
Another thanks...
very helpful, thank you!
Many thanks!
Thank you
Thank you
Thank you very much! :-)
Not only did we need this list.. but we needed it for use on our Drupal site! :-)
where is bermuda???
where is bermuda??? also, where is puerto rico? i might just not be seeing them.
Bermuda/Puerto Rico
List of countries, not territories and commonwealths
We've had a number of comments about this. This list is not geared towards including all territories and commonwealths, just countries.
For the United Kingdom the included territories are:
* Flag of the United Kingdom Akrotiri and Dhekelia
* Anguilla
* Bermuda
* British Indian Ocean Territory (disputed by Mauritius and the Seychelles)[8]
* British Virgin Islands
* Cayman Islands
* Falkland Islands (disputed by Argentina)[8]
* Gibraltar (disputed by Spain)[8]
* Montserrat
* Pitcairn Islands
* Saint Helena (with its dependencies of Ascension Island and Tristan da Cunha)
* South Georgia and the South Sandwich Islands (disputed by Argentina)[8]
* Turks and Caicos Islands[8]
* British Antarctic Territory (disputed)
The British Crown has sovereignty over
* Guernsey (with the dependencies of Alderney, Herm and Sark)
* Isle of Man
* Jersey
For the USA the list is:
* American Samoa
* Guam
* Northern Mariana Islands
* Puerto Rico
* United States Virgin Islands
Thanks... that was really
Thanks... that was really helpful...been looking around this list for a drop-down menu.
God bless!
thanks a lot
Thanks a lot - saved me loads of time!
Hey thanks this is great
Hey thanks this is great saved me loads of time
Great! thanks! anyone have cities?
This is great thanks.
I'm using it in a profanity filter system I have.
( ie, all countries and their foreign language translations go into the whitelist )
Question.
Does anyone have a list of all the major cities in the world?
Thanks heaps!
Brian
City Names
I think GeoNames is your best bet for this data, but there is also a nice looking Drupal API too.
Cheers mate, just what I
Cheers mate, just what I needed
Correction
I'm not sure if American's even realise this, but although the United Kingdom is commonly referred to as a 'country' because it has a single government which represents the entire UK on the international political stage, it is in fact a unified kingdom (as the name suggests) consisting of 4 separate countries; England, Wales, Scotland and Northern Ireland (unlike the USA, which is one country divided into separate states). On a list of 'countries' therefore it is probably more accurate to list the 4 countries separately rather than under one 'UK' entry.
It's not that we're discounting nations within the UK
But this list is mostly for things like snail mail drop-down lists for choosing countries.
The nations you have listed do not appear in the list of member states of the UN.
I think that a list that included all nations of the world would be a lot harder to maintain.
How would someone use a list of all of the world's nations?
Brilliant
1 word - Legend!
Merci !
Merci !
Thanks so much ! :-) Saved
Thanks so much ! :-) Saved me heaps of time, Cheers
Facebook
Great list. I'm trying to get Facebook friends in 100+ countries. I'll post a list of countries I need using this list. Send FRIEND SUGGESTIONS via Facebook for "obscure" countries.
THANKS!
Very helpful list
big thanks for this list ;D
big thanks for this list ;D
'Terima kasih' from Jakarta
'Terima kasih' from Jakarta (Indonesia)... I have a few hours before having to submit a project and THIS HAD BEEN SUPERB.
Thank you, you are a true
Thank you, you are a true time saver.
Some corrections...
Yugoslavia does not excist anymore and should not be on this list. On February 4, 2003 it was renamed to the "State Union of Serbia and Montenegro", and officially abolished the name "Yugoslavia". On June 3 and June 5, 2006 respectively, Montenegro and Serbia declared independence, thereby ending the Yugoslav state. --> Serbia and Montenegro should be on the list!
Kosovo is missing from the list. The 2008 Kosovo declaration of independence was adopted on 17 February 2008, and declared Kosovo to be independent from Serbia (recognized by more than 40 countries, including the USA, the UK, Germany, Norway, Sweden, Australia, and many more)
Westen Samoa changed name to Samoa in 1997.
Kosovo is not independent country
You have an error! Kosovo is not recognize as an independent country by UN and by all EU coutry, so it still has no independency. It's still part of Serbia. Please, remove it.
I have addressed this above
Kosovo is recognized by most Western countries and I am keeping it in the list. Thanks for your request though. I do hope that there is movement towards a better resolution for this issue in the near future.
Montenegro won its
Montenegro won its independence from Serbia in 2006 and was recognized by the UN the same year. "Serbia and Montenegro" doesn't exist any more.
Thanks, but where?
That's been fixed in the lists I see posted. Do you see it listed as Serbia & Montenegro somewhere?
Good Details
Especially catching the name change to Samoa.
Cape Verdi should be Verde
Cape Verdi should be Verde
Thanks
I've corrected that in the lists on this page.
Kosovo is missing from the list!!
Kosovo is missing from the list! The Assembly of Kosovo approved a declaration of independence on 17 February 2008.
Declairing Independence vs Being Recognized as Independent
Hey, thanks for your comment. I've decided to approve Kosovo, even though it isn't in the list of UN member states. It has been recognized by a critical mass of countries including Canada, USA & UK. Not that those are the only ones that matter, but they have a pretty significant impact on the web.
Thankyou
I stumbled upon this page right at the time I needed such a list. Thanks quite a lot.
- Dwayne.
Hate to be a Debbie Downer,
Hate to be a Debbie Downer, but I'm from Bermuda and you've missed me off the list...
Countries List, Not Countries & Territories
Sorry, but Bermuda is a British overseas territory so doesn't qualify for this list. If an independence manages to get international recognition, please let me know.
Bermuda
You may be right that Bermuda is a British overseas territory, but it would be useful on the list because although it belongs to the UK, selecting UK as a postal address wouldn't be very useful for Bermudans!
countries and continents
Thanks for the list now can u list the regions and continents with the countries in each? Middle East, Asia, Central America, South America etc.... Thanks
this is a timesaver!
I was actually looking to the same thing with a cck drop down list of all countries. Thanks to this list, it took me a total of 15 seconds! I googled "text list all countries" and I found your site.
Appreciation
Thank you for your list, my problem was the same and your efforts have helped me as well. Thank you.
True Copy-n-Paste Country Select List <options>
<option value="Albania">Albania</option>
<option value="Algeria">Algeria</option>
<option value="Andorra">Andorra</option>
<option value="Angola">Angola</option>
<option value="Antigua & Deps">Antigua & Deps</option>
<option value="Argentina">Argentina</option>
<option value="Armenia">Armenia</option>
<option value="Australia">Australia</option>
<option value="Austria">Austria</option>
<option value="Azerbaijan">Azerbaijan</option>
<option value="Bahamas">Bahamas</option>
<option value="Bahrain">Bahrain</option>
<option value="Bangladesh">Bangladesh</option>
<option value="Barbados">Barbados</option>
<option value="Belarus">Belarus</option>
<option value="Belgium">Belgium</option>
<option value="Belize">Belize</option>
<option value="Benin">Benin</option>
<option value="Bhutan">Bhutan</option>
<option value="Bolivia">Bolivia</option>
<option value="Bosnia Herzegovina">Bosnia Herzegovina</option>
<option value="Botswana">Botswana</option>
<option value="Brazil">Brazil</option>
<option value="Brunei">Brunei</option>
<option value="Bulgaria">Bulgaria</option>
<option value="Burkina">Burkina</option>
<option value="Burundi">Burundi</option>
<option value="Cambodia">Cambodia</option>
<option value="Cameroon">Cameroon</option>
<option value="Canada">Canada</option>
<option value="Cape Verdi">Cape Verdi</option>
<option value="Central African Rep">Central African Rep</option>
<option value="Chad">Chad</option>
<option value="Chile">Chile</option>
<option value="China">China</option>
<option value="Colombia">Colombia</option>
<option value="Comoros">Comoros</option>
<option value="Congo">Congo</option>
<option value="Congo {Democratic Rep}">Congo {Democratic Rep}</option>
<option value="Costa Rica">Costa Rica</option>
<option value="Croatia">Croatia</option>
<option value="Cuba">Cuba</option>
<option value="Cyprus">Cyprus</option>
<option value="Czech Republic">Czech Republic</option>
<option value="Denmark">Denmark</option>
<option value="Djibouti">Djibouti</option>
<option value="Dominica">Dominica</option>
<option value="Dominican Republic">Dominican Republic</option>
<option value="East Timor">East Timor</option>
<option value="Ecuador">Ecuador</option>
<option value="Egypt">Egypt</option>
<option value="El Salvador">El Salvador</option>
<option value="Equatorial Guinea">Equatorial Guinea</option>
<option value="Eritrea">Eritrea</option>
<option value="Estonia">Estonia</option>
<option value="Ethiopia">Ethiopia</option>
<option value="Fiji">Fiji</option>
<option value="Finland">Finland</option>
<option value="France">France</option>
<option value="Gabon">Gabon</option>
<option value="Gambia">Gambia</option>
<option value="Georgia">Georgia</option>
<option value="Germany">Germany</option>
<option value="Ghana">Ghana</option>
<option value="Greece">Greece</option>
<option value="Grenada">Grenada</option>
<option value="Guatemala">Guatemala</option>
<option value="Guinea">Guinea</option>
<option value="Guinea-Bissau">Guinea-Bissau</option>
<option value="Guyana">Guyana</option>
<option value="Haiti">Haiti</option>
<option value="Honduras">Honduras</option>
<option value="Hungary">Hungary</option>
<option value="Iceland">Iceland</option>
<option value="India">India</option>
<option value="Indonesia">Indonesia</option>
<option value="Iran">Iran</option>
<option value="Iraq">Iraq</option>
<option value="Ireland {Republic}">Ireland {Republic}</option>
<option value="Israel">Israel</option>
<option value="Italy">Italy</option>
<option value="Ivory Coast">Ivory Coast</option>
<option value="Jamaica">Jamaica</option>
<option value="Japan">Japan</option>
<option value="Jordan">Jordan</option>
<option value="Kazakhstan">Kazakhstan</option>
<option value="Kenya">Kenya</option>
<option value="Kiribati">Kiribati</option>
<option value="Korea North">Korea North</option>
<option value="Korea South">Korea South</option>
<option value="Kuwait">Kuwait</option>
<option value="Kyrgyzstan">Kyrgyzstan</option>
<option value="Laos">Laos</option>
<option value="Latvia">Latvia</option>
<option value="Lebanon">Lebanon</option>
<option value="Lesotho">Lesotho</option>
<option value="Liberia">Liberia</option>
<option value="Libya">Libya</option>
<option value="Liechtenstein">Liechtenstein</option>
<option value="Lithuania">Lithuania</option>
<option value="Luxembourg">Luxembourg</option>
<option value="Macedonia">Macedonia</option>
<option value="Madagascar">Madagascar</option>
<option value="Malawi">Malawi</option>
<option value="Malaysia">Malaysia</option>
<option value="Maldives">Maldives</option>
<option value="Mali">Mali</option>
<option value="Malta">Malta</option>
<option value="Marshall Islands">Marshall Islands</option>
<option value="Mauritania">Mauritania</option>
<option value="Mauritius">Mauritius</option>
<option value="Mexico">Mexico</option>
<option value="Micronesia">Micronesia</option>
<option value="Moldova">Moldova</option>
<option value="Monaco">Monaco</option>
<option value="Mongolia">Mongolia</option>
<option value="Montenegro">Montenegro</option>
<option value="Morocco">Morocco</option>
<option value="Mozambique">Mozambique</option>
<option value="Myanmar {Burma}">Myanmar {Burma}</option>
<option value="Namibia">Namibia</option>
<option value="Nauru">Nauru</option>
<option value="Nepal">Nepal</option>
<option value="Netherlands">Netherlands</option>
<option value="New Zealand">New Zealand</option>
<option value="Nicaragua">Nicaragua</option>
<option value="Niger">Niger</option>
<option value="Nigeria">Nigeria</option>
<option value="Norway">Norway</option>
<option value="Oman">Oman</option>
<option value="Pakistan">Pakistan</option>
<option value="Palau">Palau</option>
<option value="Panama">Panama</option>
<option value="Papua New Guinea">Papua New Guinea</option>
<option value="Paraguay">Paraguay</option>
<option value="Peru">Peru</option>
<option value="Philippines">Philippines</option>
<option value="Poland">Poland</option>
<option value="Portugal">Portugal</option>
<option value="Qatar">Qatar</option>
<option value="Romania">Romania</option>
<option value="Russian Federation">Russian Federation</option>
<option value="Rwanda">Rwanda</option>
<option value="St Kitts & Nevis">St Kitts & Nevis</option>
<option value="St Lucia">St Lucia</option>
<option value="St Vincent & Gr/dines">St Vincent & Gr/dines</option>
<option value="Samoa">Samoa</option>
<option value="San Marino">San Marino</option>
<option value="Sao Tome & Principe">Sao Tome & Principe</option>
<option value="Saudi Arabia">Saudi Arabia</option>
<option value="Senegal">Senegal</option>
<option value="Serbia">Serbia</option>
<option value="Seychelles">Seychelles</option>
<option value="Sierra Leone">Sierra Leone</option>
<option value="Singapore">Singapore</option>
<option value="Slovakia">Slovakia</option>
<option value="Slovenia">Slovenia</option>
<option value="Solomon Islands">Solomon Islands</option>
<option value="Somalia">Somalia</option>
<option value="South Africa">South Africa</option>
<option value="Spain">Spain</option>
<option value="Sri Lanka">Sri Lanka</option>
<option value="Sudan">Sudan</option>
<option value="Suriname">Suriname</option>
<option value="Swaziland">Swaziland</option>
<option value="Sweden">Sweden</option>
<option value="Switzerland">Switzerland</option>
<option value="Syria">Syria</option>
<option value="Taiwan">Taiwan</option>
<option value="Tajikistan">Tajikistan</option>
<option value="Tanzania">Tanzania</option>
<option value="Thailand">Thailand</option>
<option value="Togo">Togo</option>
<option value="Tonga">Tonga</option>
<option value="Trinidad & Tobago">Trinidad & Tobago</option>
<option value="Tunisia">Tunisia</option>
<option value="Turkey">Turkey</option>
<option value="Turkmenistan">Turkmenistan</option>
<option value="Tuvalu">Tuvalu</option>
<option value="Uganda">Uganda</option>
<option value="Ukraine">Ukraine</option>
<option value="United Arab Emirates">United Arab Emirates</option>
<option value="United Kingdom">United Kingdom</option>
<option value="United States">United States</option>
<option value="Uruguay">Uruguay</option>
<option value="Uzbekistan">Uzbekistan</option>
<option value="Vanuatu">Vanuatu</option>
<option value="Vatican City">Vatican City</option>
<option value="Venezuela">Venezuela</option>
<option value="Vietnam">Vietnam</option>
<option value="Yemen">Yemen</option>
<option value="Zambia">Zambia</option>
<option value="Zimbabwe">Zimbabwe</option>
Great!
Just had to say thanks. You saved me a lot of time!
Thank you
Thank you I'm going to use this list in a Drupal project to customize the user profile by adding the country field.
Thank you, I was searching
Thank you, I was searching for that, it was a real time saver
Thank you thank you thank
Thank you thank you thank you!!