Last updated March 5, 2013. Created by Chris Herberte on February 14, 2008.
Edited by davidneedham, kingandy, batigolix, pmackay. Log in to edit this page.

This is a list is of all countries from ISO 3166 to be used in the webform module.

The format is "safe_key|Some readable option", as required by webform's options instruction. The readable option is the value visible in the in response email. The safe key is the ISO 3166 alpha-2 country codes.

See also the non-piped version for the profile module

If you install Countries API in Drupal 6, Webform will automatically use it as a predefined list. Drupal 7 also includes a built-in list of countries that makes Countries API unnecessary for most purposes.

US|United States
CA|Canada
NULL|----------
AF|Afghanistan
AX|Åland Islands
AL|Albania
DZ|Algeria
AS|American Samoa
AD|Andorra
AO|Angola
AI|Anguilla
AQ|Antarctica
AG|Antigua/Barbuda
AR|Argentina
AM|Armenia
AW|Aruba
AT|Austria
AU|Australia
AZ|Azerbaijan
BS|Bahamas
BH|Bahrain
BD|Bangladesh
BB|Barbados
BY|Belarus
BE|Belgium
BZ|Belize
BJ|Benin
BM|Bermuda
BT|Bhutan
BO|Bolivia
BA|Bosnia/Herzegovina
BW|Botswana
BV|Bouvet Island
BR|Brazil
BN|Brunei Darussalam
BG|Bulgaria
BF|Burkina Faso
BI|Burundi
KH|Cambodia
CM|Cameroon
CV|Cape Verde
KY|Cayman Islands
CF|Central African Republic
TD|Chad
CL|Chile
CN|China
CX|Christmas Island
CC|Cocos (Keeling) Islands
CO|Colombia
KM|Comoros
CG|Congo
CK|Cook Islands
CR|Costa Rica
CI|Côte D'Ivoire
HR|Croatia
CU|Cuba
CY|Cyprus
CZ|Czech Republic
DK|Denmark
DJ|Djibouti
DM|Dominica
DO|Dominican Republic
EC|Ecuador
EG|Egypt
SV|El Salvador
GQ|Equatorial Guinea
ER|Eritrea
EE|Estonia
ET|Ethiopia
FK|Falkland Islands(Malvinas)
FO|Faroe Islands
FJ|Fiji
FI|Finland
FR|France
GF|French Guiana
PF|French Polynesia
TF|French Southern Territories
GA|Gabon
GM|Gambia
GE|Georgia
DE|Germany
GH|Ghana
GI|Gibraltar
GR|Greece
GL|Greenland
GD|Grenada
GP|Guadeloupe
GU|Guam
GT|Guatemala
GG|Guernsey
GN|Guinea
GW|Guinea-Bissau
GY|Guyana
HT|Haiti
HM|Heard Island/Mcdonald Islands
HN|Honduras
HK|Hong Kong
HU|Hungary
IS|Iceland
IN|India
ID|Indonesia
IR|Iran
IQ|Iraq
IE|Ireland
IM|Isle Of Man
IL|Israel
IT|Italy
JM|Jamaica
JP|Japan
JE|Jersey
JO|Jordan
KZ|Kazakhstan
KE|Kenya
KI|Kiribati
KW|Kuwait
KG|Kyrgyzstan
LA|Lao
LV|Latvia
LB|Lebanon
LS|Lesotho
LR|Liberia
LY|Libyan Arab Jamahiriya
LI|Liechtenstein
LT|Lithuania
LU|Luxembourg
MO|Macao
MK|Macedonia
MG|Madagascar
MW|Malawi
MY|Malaysia
MV|Maldives
ML|Mali
MT|Malta
MH|Marshall Islands
MQ|Martinique
MR|Mauritania
MU|Mauritius
YT|Mayotte
MX|Mexico
FM|Micronesia
MD|Moldova
MC|Monaco
MN|Mongolia
ME|Montenegro
MS|Montserrat
MA|Morocco
MZ|Mozambique
MM|Myanmar
NA|Namibia
NR|Nauru
NP|Nepal
NL|Netherlands
AN|Netherlands Antilles
NC|New Caledonia
NZ|New Zealand
NI|Nicaragua
NE|Niger
NG|Nigeria
NU|Niue
NF|Norfolk Island
KP|North Korea
MP|Northern Mariana Islands
NO|Norway
OM|Oman
PK|Pakistan
PW|Palau
PS|Palestine
PA|Panama
PG|Papua New Guinea
PY|Paraguay
PE|Peru
PH|Philippines
PN|Pitcairn
PL|Poland
PT|Portugal
PR|Puerto Rico
QA|Qatar
RE|Réunion
RO|Romania
RU|Russian Federation
RW|Rwanda
BL|St. Barthélemy
SH|St. Helena
KN|St. Kitts/Nevis
LC|St. Lucia
MF|St. Martin
PM|St. Pierre/Miquelon
VC|St. Vincent/The Grenadines
WS|Samoa
SM|San Marino
ST|Sao Tome/Principe
SA|Saudi Arabia
SN|Senegal
RS|Serbia
SC|Seychelles
SL|Sierra Leone
SG|Singapore
SK|Slovakia
SI|Slovenia
SB|Solomon Islands
SO|Somalia
ZA|South Africa
GS|South Georgia/Sandwich Islands
KR|South Korea
ES|Spain
LK|Sri Lanka
SD|Sudan
SR|Suriname
SJ|Svalbard/Jan Mayen
SZ|Swaziland
SE|Sweden
CH|Switzerland
SY|Syrian Arab Republic
TW|Taiwan
TJ|Tajikistan
TZ|Tanzania
TH|Thailand
TL|Timor-Leste
TG|Togo
TK|Tokelau
TO|Tonga
TT|Trinidad And Tobago
TN|Tunisia
TR|Turkey
TM|Turkmenistan
TC|Turks/Caicos Islands
TV|Tuvalu
UG|Uganda
UA|Ukraine
AE|United Arab Emirates
GB|United Kingdom
UM|United States Minor Islands
UY|Uruguay
UZ|Uzbekistan
VU|Vanuatu
VA|Vatican City State
VE|Venezuela
VN|Viet Nam
VG|"Virgin Islands, British"
VI|"Virgin Islands, U.S."
WF|Wallis/Futuna
EH|Western Sahara
YE|Yemen
ZM|Zambia
ZW|Zimbabwe

States of the United States of America

Canadian Provinces and Territories

AB|Alberta
BC|British Columbia
MB|Manitoba
NB|New Brunswick
NL|Newfoundland and Labrador
NS|Nova Scotia
NT|Northwest Territories
NU|Nunavut
ON|Ontario
PE|Prince Edward Island
QC|Quebec
SK|Saskatchewan
YT|Yukon

Using Zend Framework for a language country list

Using Zend Framework you can get a nice list of countries in your language ready to copy/paste for your webform with the following code:

<?php
  set_include_path
('/your/path/to/ZendFramework/library/');
  require
'Zend/Locale.php';
 
$locale = new Zend_Locale();
 
$lang = 'en';
 
$countries = ($locale->getTranslationList('Territory', $lang, 2));
 
asort($countries, SORT_LOCALE_STRING);
  foreach(
$countries as $code => $name) {
    print
$code.'|'.$name."<br />\n";
  }
?>

You can change the $lang variable to almost any code you want, for example 'ja' for Japanese, 'es' for Spanish and so on. Remember to change the include path to your Zend Framework installation.

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.