Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
HTML <select> international calling codes for each country
<!-- country codes (ISO 3166) and Dial codes. -->
<select name="countryCode" id="">
<option data-countryCode="GB" value="44" Selected>UK (+44)</option>
<option data-countryCode="US" value="1">USA (+1)</option>
<optgroup label="Other countries">
<option data-countryCode="DZ" value="213">Algeria (+213)</option>
<option data-countryCode="AD" value="376">Andorra (+376)</option>
<option data-countryCode="AO" value="244">Angola (+244)</option>
<option data-countryCode="AI" value="1264">Anguilla (+1264)</option>
<option data-countryCode="AG" value="1268">Antigua &amp; Barbuda (+1268)</option>
<option data-countryCode="AR" value="54">Argentina (+54)</option>
<option data-countryCode="AM" value="374">Armenia (+374)</option>
<option data-countryCode="AW" value="297">Aruba (+297)</option>
<option data-countryCode="AU" value="61">Australia (+61)</option>
<option data-countryCode="AT" value="43">Austria (+43)</option>
<option data-countryCode="AZ" value="994">Azerbaijan (+994)</option>
<option data-countryCode="BS" value="1242">Bahamas (+1242)</option>
<option data-countryCode="BH" value="973">Bahrain (+973)</option>
<option data-countryCode="BD" value="880">Bangladesh (+880)</option>
<option data-countryCode="BB" value="1246">Barbados (+1246)</option>
<option data-countryCode="BY" value="375">Belarus (+375)</option>
<option data-countryCode="BE" value="32">Belgium (+32)</option>
<option data-countryCode="BZ" value="501">Belize (+501)</option>
<option data-countryCode="BJ" value="229">Benin (+229)</option>
<option data-countryCode="BM" value="1441">Bermuda (+1441)</option>
<option data-countryCode="BT" value="975">Bhutan (+975)</option>
<option data-countryCode="BO" value="591">Bolivia (+591)</option>
<option data-countryCode="BA" value="387">Bosnia Herzegovina (+387)</option>
<option data-countryCode="BW" value="267">Botswana (+267)</option>
<option data-countryCode="BR" value="55">Brazil (+55)</option>
<option data-countryCode="BN" value="673">Brunei (+673)</option>
<option data-countryCode="BG" value="359">Bulgaria (+359)</option>
<option data-countryCode="BF" value="226">Burkina Faso (+226)</option>
<option data-countryCode="BI" value="257">Burundi (+257)</option>
<option data-countryCode="KH" value="855">Cambodia (+855)</option>
<option data-countryCode="CM" value="237">Cameroon (+237)</option>
<option data-countryCode="CA" value="1">Canada (+1)</option>
<option data-countryCode="CV" value="238">Cape Verde Islands (+238)</option>
<option data-countryCode="KY" value="1345">Cayman Islands (+1345)</option>
<option data-countryCode="CF" value="236">Central African Republic (+236)</option>
<option data-countryCode="CL" value="56">Chile (+56)</option>
<option data-countryCode="CN" value="86">China (+86)</option>
<option data-countryCode="CO" value="57">Colombia (+57)</option>
<option data-countryCode="KM" value="269">Comoros (+269)</option>
<option data-countryCode="CG" value="242">Congo (+242)</option>
<option data-countryCode="CK" value="682">Cook Islands (+682)</option>
<option data-countryCode="CR" value="506">Costa Rica (+506)</option>
<option data-countryCode="HR" value="385">Croatia (+385)</option>
<option data-countryCode="CU" value="53">Cuba (+53)</option>
<option data-countryCode="CY" value="90392">Cyprus North (+90392)</option>
<option data-countryCode="CY" value="357">Cyprus South (+357)</option>
<option data-countryCode="CZ" value="42">Czech Republic (+42)</option>
<option data-countryCode="DK" value="45">Denmark (+45)</option>
<option data-countryCode="DJ" value="253">Djibouti (+253)</option>
<option data-countryCode="DM" value="1809">Dominica (+1809)</option>
<option data-countryCode="DO" value="1809">Dominican Republic (+1809)</option>
<option data-countryCode="EC" value="593">Ecuador (+593)</option>
<option data-countryCode="EG" value="20">Egypt (+20)</option>
<option data-countryCode="SV" value="503">El Salvador (+503)</option>
<option data-countryCode="GQ" value="240">Equatorial Guinea (+240)</option>
<option data-countryCode="ER" value="291">Eritrea (+291)</option>
<option data-countryCode="EE" value="372">Estonia (+372)</option>
<option data-countryCode="ET" value="251">Ethiopia (+251)</option>
<option data-countryCode="FK" value="500">Falkland Islands (+500)</option>
<option data-countryCode="FO" value="298">Faroe Islands (+298)</option>
<option data-countryCode="FJ" value="679">Fiji (+679)</option>
<option data-countryCode="FI" value="358">Finland (+358)</option>
<option data-countryCode="FR" value="33">France (+33)</option>
<option data-countryCode="GF" value="594">French Guiana (+594)</option>
<option data-countryCode="PF" value="689">French Polynesia (+689)</option>
<option data-countryCode="GA" value="241">Gabon (+241)</option>
<option data-countryCode="GM" value="220">Gambia (+220)</option>
<option data-countryCode="GE" value="7880">Georgia (+7880)</option>
<option data-countryCode="DE" value="49">Germany (+49)</option>
<option data-countryCode="GH" value="233">Ghana (+233)</option>
<option data-countryCode="GI" value="350">Gibraltar (+350)</option>
<option data-countryCode="GR" value="30">Greece (+30)</option>
<option data-countryCode="GL" value="299">Greenland (+299)</option>
<option data-countryCode="GD" value="1473">Grenada (+1473)</option>
<option data-countryCode="GP" value="590">Guadeloupe (+590)</option>
<option data-countryCode="GU" value="671">Guam (+671)</option>
<option data-countryCode="GT" value="502">Guatemala (+502)</option>
<option data-countryCode="GN" value="224">Guinea (+224)</option>
<option data-countryCode="GW" value="245">Guinea - Bissau (+245)</option>
<option data-countryCode="GY" value="592">Guyana (+592)</option>
<option data-countryCode="HT" value="509">Haiti (+509)</option>
<option data-countryCode="HN" value="504">Honduras (+504)</option>
<option data-countryCode="HK" value="852">Hong Kong (+852)</option>
<option data-countryCode="HU" value="36">Hungary (+36)</option>
<option data-countryCode="IS" value="354">Iceland (+354)</option>
<option data-countryCode="IN" value="91">India (+91)</option>
<option data-countryCode="ID" value="62">Indonesia (+62)</option>
<option data-countryCode="IR" value="98">Iran (+98)</option>
<option data-countryCode="IQ" value="964">Iraq (+964)</option>
<option data-countryCode="IE" value="353">Ireland (+353)</option>
<option data-countryCode="IL" value="972">Israel (+972)</option>
<option data-countryCode="IT" value="39">Italy (+39)</option>
<option data-countryCode="JM" value="1876">Jamaica (+1876)</option>
<option data-countryCode="JP" value="81">Japan (+81)</option>
<option data-countryCode="JO" value="962">Jordan (+962)</option>
<option data-countryCode="KZ" value="7">Kazakhstan (+7)</option>
<option data-countryCode="KE" value="254">Kenya (+254)</option>
<option data-countryCode="KI" value="686">Kiribati (+686)</option>
<option data-countryCode="KP" value="850">Korea North (+850)</option>
<option data-countryCode="KR" value="82">Korea South (+82)</option>
<option data-countryCode="KW" value="965">Kuwait (+965)</option>
<option data-countryCode="KG" value="996">Kyrgyzstan (+996)</option>
<option data-countryCode="LA" value="856">Laos (+856)</option>
<option data-countryCode="LV" value="371">Latvia (+371)</option>
<option data-countryCode="LB" value="961">Lebanon (+961)</option>
<option data-countryCode="LS" value="266">Lesotho (+266)</option>
<option data-countryCode="LR" value="231">Liberia (+231)</option>
<option data-countryCode="LY" value="218">Libya (+218)</option>
<option data-countryCode="LI" value="417">Liechtenstein (+417)</option>
<option data-countryCode="LT" value="370">Lithuania (+370)</option>
<option data-countryCode="LU" value="352">Luxembourg (+352)</option>
<option data-countryCode="MO" value="853">Macao (+853)</option>
<option data-countryCode="MK" value="389">Macedonia (+389)</option>
<option data-countryCode="MG" value="261">Madagascar (+261)</option>
<option data-countryCode="MW" value="265">Malawi (+265)</option>
<option data-countryCode="MY" value="60">Malaysia (+60)</option>
<option data-countryCode="MV" value="960">Maldives (+960)</option>
<option data-countryCode="ML" value="223">Mali (+223)</option>
<option data-countryCode="MT" value="356">Malta (+356)</option>
<option data-countryCode="MH" value="692">Marshall Islands (+692)</option>
<option data-countryCode="MQ" value="596">Martinique (+596)</option>
<option data-countryCode="MR" value="222">Mauritania (+222)</option>
<option data-countryCode="YT" value="269">Mayotte (+269)</option>
<option data-countryCode="MX" value="52">Mexico (+52)</option>
<option data-countryCode="FM" value="691">Micronesia (+691)</option>
<option data-countryCode="MD" value="373">Moldova (+373)</option>
<option data-countryCode="MC" value="377">Monaco (+377)</option>
<option data-countryCode="MN" value="976">Mongolia (+976)</option>
<option data-countryCode="MS" value="1664">Montserrat (+1664)</option>
<option data-countryCode="MA" value="212">Morocco (+212)</option>
<option data-countryCode="MZ" value="258">Mozambique (+258)</option>
<option data-countryCode="MN" value="95">Myanmar (+95)</option>
<option data-countryCode="NA" value="264">Namibia (+264)</option>
<option data-countryCode="NR" value="674">Nauru (+674)</option>
<option data-countryCode="NP" value="977">Nepal (+977)</option>
<option data-countryCode="NL" value="31">Netherlands (+31)</option>
<option data-countryCode="NC" value="687">New Caledonia (+687)</option>
<option data-countryCode="NZ" value="64">New Zealand (+64)</option>
<option data-countryCode="NI" value="505">Nicaragua (+505)</option>
<option data-countryCode="NE" value="227">Niger (+227)</option>
<option data-countryCode="NG" value="234">Nigeria (+234)</option>
<option data-countryCode="NU" value="683">Niue (+683)</option>
<option data-countryCode="NF" value="672">Norfolk Islands (+672)</option>
<option data-countryCode="NP" value="670">Northern Marianas (+670)</option>
<option data-countryCode="NO" value="47">Norway (+47)</option>
<option data-countryCode="OM" value="968">Oman (+968)</option>
<option data-countryCode="PW" value="680">Palau (+680)</option>
<option data-countryCode="PA" value="507">Panama (+507)</option>
<option data-countryCode="PG" value="675">Papua New Guinea (+675)</option>
<option data-countryCode="PY" value="595">Paraguay (+595)</option>
<option data-countryCode="PE" value="51">Peru (+51)</option>
<option data-countryCode="PH" value="63">Philippines (+63)</option>
<option data-countryCode="PL" value="48">Poland (+48)</option>
<option data-countryCode="PT" value="351">Portugal (+351)</option>
<option data-countryCode="PR" value="1787">Puerto Rico (+1787)</option>
<option data-countryCode="QA" value="974">Qatar (+974)</option>
<option data-countryCode="RE" value="262">Reunion (+262)</option>
<option data-countryCode="RO" value="40">Romania (+40)</option>
<option data-countryCode="RU" value="7">Russia (+7)</option>
<option data-countryCode="RW" value="250">Rwanda (+250)</option>
<option data-countryCode="SM" value="378">San Marino (+378)</option>
<option data-countryCode="ST" value="239">Sao Tome &amp; Principe (+239)</option>
<option data-countryCode="SA" value="966">Saudi Arabia (+966)</option>
<option data-countryCode="SN" value="221">Senegal (+221)</option>
<option data-countryCode="CS" value="381">Serbia (+381)</option>
<option data-countryCode="SC" value="248">Seychelles (+248)</option>
<option data-countryCode="SL" value="232">Sierra Leone (+232)</option>
<option data-countryCode="SG" value="65">Singapore (+65)</option>
<option data-countryCode="SK" value="421">Slovak Republic (+421)</option>
<option data-countryCode="SI" value="386">Slovenia (+386)</option>
<option data-countryCode="SB" value="677">Solomon Islands (+677)</option>
<option data-countryCode="SO" value="252">Somalia (+252)</option>
<option data-countryCode="ZA" value="27">South Africa (+27)</option>
<option data-countryCode="ES" value="34">Spain (+34)</option>
<option data-countryCode="LK" value="94">Sri Lanka (+94)</option>
<option data-countryCode="SH" value="290">St. Helena (+290)</option>
<option data-countryCode="KN" value="1869">St. Kitts (+1869)</option>
<option data-countryCode="SC" value="1758">St. Lucia (+1758)</option>
<option data-countryCode="SD" value="249">Sudan (+249)</option>
<option data-countryCode="SR" value="597">Suriname (+597)</option>
<option data-countryCode="SZ" value="268">Swaziland (+268)</option>
<option data-countryCode="SE" value="46">Sweden (+46)</option>
<option data-countryCode="CH" value="41">Switzerland (+41)</option>
<option data-countryCode="SI" value="963">Syria (+963)</option>
<option data-countryCode="TW" value="886">Taiwan (+886)</option>
<option data-countryCode="TJ" value="7">Tajikstan (+7)</option>
<option data-countryCode="TH" value="66">Thailand (+66)</option>
<option data-countryCode="TG" value="228">Togo (+228)</option>
<option data-countryCode="TO" value="676">Tonga (+676)</option>
<option data-countryCode="TT" value="1868">Trinidad &amp; Tobago (+1868)</option>
<option data-countryCode="TN" value="216">Tunisia (+216)</option>
<option data-countryCode="TR" value="90">Turkey (+90)</option>
<option data-countryCode="TM" value="7">Turkmenistan (+7)</option>
<option data-countryCode="TM" value="993">Turkmenistan (+993)</option>
<option data-countryCode="TC" value="1649">Turks &amp; Caicos Islands (+1649)</option>
<option data-countryCode="TV" value="688">Tuvalu (+688)</option>
<option data-countryCode="UG" value="256">Uganda (+256)</option>
<!-- <option data-countryCode="GB" value="44">UK (+44)</option> -->
<option data-countryCode="UA" value="380">Ukraine (+380)</option>
<option data-countryCode="AE" value="971">United Arab Emirates (+971)</option>
<option data-countryCode="UY" value="598">Uruguay (+598)</option>
<!-- <option data-countryCode="US" value="1">USA (+1)</option> -->
<option data-countryCode="UZ" value="7">Uzbekistan (+7)</option>
<option data-countryCode="VU" value="678">Vanuatu (+678)</option>
<option data-countryCode="VA" value="379">Vatican City (+379)</option>
<option data-countryCode="VE" value="58">Venezuela (+58)</option>
<option data-countryCode="VN" value="84">Vietnam (+84)</option>
<option data-countryCode="VG" value="84">Virgin Islands - British (+1284)</option>
<option data-countryCode="VI" value="84">Virgin Islands - US (+1340)</option>
<option data-countryCode="WF" value="681">Wallis &amp; Futuna (+681)</option>
<option data-countryCode="YE" value="969">Yemen (North)(+969)</option>
<option data-countryCode="YE" value="967">Yemen (South)(+967)</option>
<option data-countryCode="ZM" value="260">Zambia (+260)</option>
<option data-countryCode="ZW" value="263">Zimbabwe (+263)</option>
</optgroup>
</select>
@IsiomaOgbuehi
Copy link

IsiomaOgbuehi commented Oct 4, 2018

Great!!! Thanks.

Copy link

ghost commented Oct 12, 2018

Great work but why you use "data-countryCode" attribute ?

@Femina
Copy link

Femina commented Feb 27, 2019

I need to send data-countryCode value to backend but how to access it ?

@NicholasKimuli
Copy link

NicholasKimuli commented May 9, 2019

Created an East African countries focused option here: https://gist.github.com/NicholasKimuli/2b167ca1c6ce03cb860e3f89d17db1eb

Added Tanzania to the list as well.

@lbarwiko
Copy link

lbarwiko commented Jul 14, 2019

This was very helpful and saved me a lot of time :)

@dant30
Copy link

dant30 commented Jan 2, 2020

that's so great

@vista-54
Copy link

vista-54 commented Mar 11, 2020

The Ukraine is +38, not +380

@Brondchux
Copy link

Brondchux commented Mar 26, 2020

Good job fella! Is there a version that shows the country flag as well?

@Ayushverma8
Copy link

Ayushverma8 commented Mar 27, 2020

Hey this is great but it is missing quite a few countries. I added them here: https://gist.github.com/govindad/e0bbe036906f413b40ca . All the countries are present in intl-call-codes-full.json and intl-call-codes-full-minified.json. It's no longer a select (it's json now) but it has all the country codes that geoip supports.

Expired. Please update the file.

@shanutthankachan
Copy link

shanutthankachan commented Apr 9, 2020

The Ukraine is +38, not +380

Google shows +380

@SUBINPTPM
Copy link

SUBINPTPM commented Apr 16, 2020

Great work but why you use "data-countryCode" attribute ?

How to get the value?

@MarcoMihaiCondrache
Copy link

MarcoMihaiCondrache commented May 13, 2020

Great work but why you use "data-countryCode" attribute ?

How to get the value?

You can get it with javascript

@mussaizadini
Copy link

mussaizadini commented Jun 19, 2020

Nice and great work👍👍

@osamamoinchawla
Copy link

osamamoinchawla commented Jul 7, 2020

Great work but missing countries

@Himanshucodee
Copy link

Himanshucodee commented Aug 27, 2020

<select name="" id=""> <option data-countryCode="DZ" value="213">(+213)</option> <option data-countryCode="AD" value="376">(+376)</option> <option data-countryCode="AO" value="244">(+244)</option> <option data-countryCode="AI" value="1264">(+1264)</option> <option data-countryCode="AG" value="1268">(+1268)</option> <option data-countryCode="AR" value="54">(+54)</option> <option data-countryCode="AM" value="374">(+374)</option> <option data-countryCode="AW" value="297">(+297)</option> <option data-countryCode="AU" value="61">(+61)</option> <option data-countryCode="AT" value="43">(+43)</option> <option data-countryCode="AZ" value="994">(+994)</option> <option data-countryCode="BS" value="1242">(+1242)</option> <option data-countryCode="BH" value="973">(+973)</option> <option data-countryCode="BD" value="880">(+880)</option> <option data-countryCode="BB" value="1246">(+1246)</option> <option data-countryCode="BY" value="375">(+375)</option> <option data-countryCode="BE" value="32">(+32)</option> <option data-countryCode="BZ" value="501">(+501)</option> <option data-countryCode="BJ" value="229">(+229)</option> <option data-countryCode="BM" value="1441">(+1441)</option> <option data-countryCode="BT" value="975">(+975)</option> <option data-countryCode="BO" value="591">(+591)</option> <option data-countryCode="BA" value="387">(+387)</option> <option data-countryCode="BW" value="267">(+267)</option> <option data-countryCode="BR" value="55">(+55)</option> <option data-countryCode="BN" value="673">(+673)</option> <option data-countryCode="BG" value="359">(+359)</option> <option data-countryCode="BF" value="226">(+226)</option> <option data-countryCode="BI" value="257">(+257)</option> <option data-countryCode="KH" value="855">(+855)</option> <option data-countryCode="CM" value="237">(+237)</option> <option data-countryCode="CA" value="1">(+1)</option> <option data-countryCode="CV" value="238">(+238)</option> <option data-countryCode="KY" value="1345">(+1345)</option> <option data-countryCode="CF" value="236">(+236)</option> <option data-countryCode="CL" value="56">(+56)</option> <option data-countryCode="CN" value="86">(+86)</option> <option data-countryCode="CO" value="57">(+57)</option> <option data-countryCode="KM" value="269">(+269)</option> <option data-countryCode="CG" value="242">(+242)</option> <option data-countryCode="CK" value="682">(+682)</option> <option data-countryCode="CR" value="506">(+506)</option> <option data-countryCode="HR" value="385">(+385)</option> <option data-countryCode="CU" value="53">(+53)</option> <option data-countryCode="CY" value="90392">(+90392)</option> <option data-countryCode="CY" value="357">(+357)</option> <option data-countryCode="CZ" value="42">(+42)</option> <option data-countryCode="DK" value="45">(+45)</option> <option data-countryCode="DJ" value="253">(+253)</option> <option data-countryCode="DM" value="1809">(+1809)</option> <option data-countryCode="DO" value="1809">(+1809)</option> <option data-countryCode="EC" value="593">(+593)</option> <option data-countryCode="EG" value="20">(+20)</option> <option data-countryCode="SV" value="503">(+503)</option> <option data-countryCode="GQ" value="240">(+240)</option> <option data-countryCode="ER" value="291">(+291)</option> <option data-countryCode="EE" value="372">(+372)</option> <option data-countryCode="ET" value="251">(+251)</option> <option data-countryCode="FK" value="500">(+500)</option> <option data-countryCode="FO" value="298">(+298)</option> <option data-countryCode="FJ" value="679">(+679)</option> <option data-countryCode="FI" value="358">(+358)</option> <option data-countryCode="FR" value="33">(+33)</option> <option data-countryCode="GF" value="594">(+594)</option> <option data-countryCode="PF" value="689">(+689)</option> <option data-countryCode="GA" value="241">(+241)</option> <option data-countryCode="GM" value="220">(+220)</option> <option data-countryCode="GE" value="7880">(+7880)</option> <option data-countryCode="DE" value="49">(+49)</option> <option data-countryCode="GH" value="233">(+233)</option> <option data-countryCode="GI" value="350">(+350)</option> <option data-countryCode="GR" value="30">(+30)</option> <option data-countryCode="GL" value="299">(+299)</option> <option data-countryCode="GD" value="1473">(+1473)</option> <option data-countryCode="GP" value="590">(+590)</option> <option data-countryCode="GU" value="671">(+671)</option> <option data-countryCode="GT" value="502">(+502)</option> <option data-countryCode="GN" value="224">(+224)</option> <option data-countryCode="GW" value="245">(+245)</option> <option data-countryCode="GY" value="592">(+592)</option> <option data-countryCode="HT" value="509">(+509)</option> <option data-countryCode="HN" value="504">(+504)</option> <option data-countryCode="HK" value="852">(+852)</option> <option data-countryCode="HU" value="36">(+36)</option> <option data-countryCode="IS" value="354">(+354)</option> <option data-countryCode="IN" value="91">(+91)</option> <option data-countryCode="ID" value="62">(+62)</option> <option data-countryCode="IR" value="98">(+98)</option> <option data-countryCode="IQ" value="964">(+964)</option> <option data-countryCode="IE" value="353">(+353)</option> <option data-countryCode="IL" value="972">(+972)</option> <option data-countryCode="IT" value="39">(+39)</option> <option data-countryCode="JM" value="1876">(+1876)</option> <option data-countryCode="JP" value="81">(+81)</option> <option data-countryCode="JO" value="962">(+962)</option> <option data-countryCode="KZ" value="7">(+7)</option> <option data-countryCode="KE" value="254">(+254)</option> <option data-countryCode="KI" value="686">(+686)</option> <option data-countryCode="KP" value="850">(+850)</option> <option data-countryCode="KR" value="82">(+82)</option> <option data-countryCode="KW" value="965">(+965)</option> <option data-countryCode="KG" value="996">(+996)</option> <option data-countryCode="LA" value="856">(+856)</option> <option data-countryCode="LV" value="371">(+371)</option> <option data-countryCode="LB" value="961">(+961)</option> <option data-countryCode="LS" value="266">(+266)</option> <option data-countryCode="LR" value="231">(+231)</option> <option data-countryCode="LY" value="218">(+218)</option> <option data-countryCode="LI" value="417">(+417)</option> <option data-countryCode="LT" value="370">(+370)</option> <option data-countryCode="LU" value="352">(+352)</option> <option data-countryCode="MO" value="853">(+853)</option> <option data-countryCode="MK" value="389">(+389)</option> <option data-countryCode="MG" value="261">(+261)</option> <option data-countryCode="MW" value="265">(+265)</option> <option data-countryCode="MY" value="60">(+60)</option> <option data-countryCode="MV" value="960">(+960)</option> <option data-countryCode="ML" value="223">(+223)</option> <option data-countryCode="MT" value="356">(+356)</option> <option data-countryCode="MH" value="692">(+692)</option> <option data-countryCode="MQ" value="596">(+596)</option> <option data-countryCode="MR" value="222">(+222)</option> <option data-countryCode="YT" value="269">(+269)</option> <option data-countryCode="MX" value="52">(+52)</option> <option data-countryCode="FM" value="691">(+691)</option> <option data-countryCode="MD" value="373">(+373)</option> <option data-countryCode="MC" value="377">(+377)</option> <option data-countryCode="MN" value="976">(+976)</option> <option data-countryCode="MS" value="1664">(+1664)</option> <option data-countryCode="MA" value="212">(+212)</option> <option data-countryCode="MZ" value="258">(+258)</option> <option data-countryCode="MN" value="95">(+95)</option> <option data-countryCode="NA" value="264">(+264)</option> <option data-countryCode="NR" value="674">(+674)</option> <option data-countryCode="NP" value="977">(+977)</option> <option data-countryCode="NL" value="31">(+31)</option> <option data-countryCode="NC" value="687">(+687)</option> <option data-countryCode="NZ" value="64">(+64)</option> <option data-countryCode="NI" value="505">(+505)</option> <option data-countryCode="NE" value="227">(+227)</option> <option data-countryCode="NG" value="234">(+234)</option> <option data-countryCode="NU" value="683">(+683)</option> <option data-countryCode="NF" value="672">(+672)</option> <option data-countryCode="NP" value="670">(+670)</option> <option data-countryCode="NO" value="47">(+47)</option> <option data-countryCode="OM" value="968">(+968)</option> <option data-countryCode="PW" value="680">(+680)</option> <option data-countryCode="PA" value="507">(+507)</option> <option data-countryCode="PG" value="675">(+675)</option> <option data-countryCode="PY" value="595">(+595)</option> <option data-countryCode="PE" value="51">(+51)</option> <option data-countryCode="PH" value="63">(+63)</option> <option data-countryCode="PL" value="48">(+48)</option> <option data-countryCode="PT" value="351">(+351)</option> <option data-countryCode="PR" value="1787">(+1787)</option> <option data-countryCode="QA" value="974">(+974)</option> <option data-countryCode="RE" value="262">(+262)</option> <option data-countryCode="RO" value="40">(+40)</option> <option data-countryCode="RU" value="7">(+7)</option> <option data-countryCode="RW" value="250">(+250)</option> <option data-countryCode="SM" value="378">(+378)</option> <option data-countryCode="ST" value="239">(+239)</option> <option data-countryCode="SA" value="966">(+966)</option> <option data-countryCode="SN" value="221">(+221)</option> <option data-countryCode="CS" value="381">(+381)</option> <option data-countryCode="SC" value="248">(+248)</option> <option data-countryCode="SL" value="232">(+232)</option> <option data-countryCode="SG" value="65">(+65)</option> <option data-countryCode="SK" value="421">(+421)</option> <option data-countryCode="SI" value="386">(+386)</option> <option data-countryCode="SB" value="677">(+677)</option> <option data-countryCode="SO" value="252">(+252)</option> <option data-countryCode="ZA" value="27">(+27)</option> <option data-countryCode="ES" value="34">(+34)</option> <option data-countryCode="LK" value="94">(+94)</option> <option data-countryCode="SH" value="290">(+290)</option> <option data-countryCode="KN" value="1869">(+1869)</option> <option data-countryCode="SC" value="1758">(+1758)</option> <option data-countryCode="SD" value="249">(+249)</option> <option data-countryCode="SR" value="597">(+597)</option> <option data-countryCode="SZ" value="268">(+268)</option> <option data-countryCode="SE" value="46">(+46)</option> <option data-countryCode="CH" value="41">(+41)</option> <option data-countryCode="SI" value="963">(+963)</option> <option data-countryCode="TW" value="886">(+886)</option> <option data-countryCode="TJ" value="7">(+7)</option> <option data-countryCode="TH" value="66">(+66)</option> <option data-countryCode="TG" value="228">(+228)</option> <option data-countryCode="TO" value="676">(+676)</option> <option data-countryCode="TT" value="1868">(+1868)</option> <option data-countryCode="TN" value="216">(+216)</option> <option data-countryCode="TR" value="90">(+90)</option> <option data-countryCode="TM" value="7">(+7)</option> <option data-countryCode="TM" value="993">(+993)</option> <option data-countryCode="TC" value="1649">(+1649)</option> <option data-countryCode="TV" value="688">(+688)</option> <option data-countryCode="UG" value="256">(+256)</option> <option data-countryCode="GB" value="44">(+44)</option> <option data-countryCode="UA" value="380">(+380)</option> <option data-countryCode="AE" value="971">(+971)</option> <option data-countryCode="UY" value="598">(+598)</option> <option data-countryCode="US" value="1">(+1)</option> <option data-countryCode="UZ" value="7">(+7)</option> <option data-countryCode="VU" value="678">(+678)</option> <option data-countryCode="VA" value="379">(+379)</option> <option data-countryCode="VE" value="58">(+58)</option> <option data-countryCode="VN" value="84">(+84)</option> <option data-countryCode="VG" value="84">(+1284)</option> <option data-countryCode="VI" value="84">(+1340)</option> <option data-countryCode="WF" value="681">(+681)</option> <option data-countryCode="YE" value="969">(+969)</option> <option data-countryCode="YE" value="967">(+967)</option> <option data-countryCode="ZM" value="260">(+260)</option> <option data-countryCode="ZW" value="263">(+263)</option> </select> In case someone donot need country name.

@vvnazarov
Copy link

vvnazarov commented Sep 21, 2020

The Ukraine is +38, not +380

Sad but true
Ukraine is +380, not +38, such as ex-Yugoslaviya
https://en.wikipedia.org/wiki/List_of_country_calling_codes#Zones_3–4:_Europe

@kyuhokim11
Copy link

kyuhokim11 commented Sep 22, 2020

Thank you!!

@bkmgit
Copy link

bkmgit commented Sep 23, 2020

Thanks. @Brondchux Updated version using Emojis for flags at:
https://gist.github.com/bkmgit/7bab7348aca1a7eb44d05e8f641275fd

@hajjaj
Copy link

hajjaj commented Nov 21, 2020

Yemen (North)(+969) Yemen (South)(+967)

it is one country now no south and north,correct one below ;

Yemen(+967)

@bkmgit
Copy link

bkmgit commented Nov 21, 2020

@riza-javascript
Copy link

riza-javascript commented Dec 20, 2020

data-country code is from bootstrap?

@BenjaminMerlynS
Copy link

BenjaminMerlynS commented Jan 28, 2021

Czech Republic is +420 and not +42 :)

@rbluena
Copy link

rbluena commented May 20, 2021

Created an East African countries focused option here: https://gist.github.com/NicholasKimuli/2b167ca1c6ce03cb860e3f89d17db1eb

Added Tanzania to the list as well.

Thanks.

@xxshubhamxx
Copy link

xxshubhamxx commented May 20, 2021

Thanks, this is very helpful

@Z3yko
Copy link

Z3yko commented Jul 3, 2021

why would someone hardcode this when there is something like this https://github.com/jackocnr/intl-tel-input

@bharathram21391
Copy link

bharathram21391 commented Jul 20, 2021

Thank you very, very, very, very much for this code. This helped so much. I can't explain in words.

@gterzis
Copy link

gterzis commented Sep 9, 2021

Τhere is only one Cyprus (Republic of Cyprus +357). Neither South or North

@Rachad-Alabi-ADEKAMBI
Copy link

Rachad-Alabi-ADEKAMBI commented Oct 25, 2021

be blessed

@baptisteArno
Copy link

baptisteArno commented Feb 22, 2022

If you need country code as value

      <option value="DZ">Algeria (+213)</option>
      <option value="AD">Andorra (+376)</option>
      <option value="AO">Angola (+244)</option>
      <option value="AI">Anguilla (+1264)</option>
      <option value="AG">Antigua &amp; Barbuda (+1268)</option>
      <option value="AR">Argentina (+54)</option>
      <option value="AM">Armenia (+374)</option>
      <option value="AW">Aruba (+297)</option>
      <option value="AU">Australia (+61)</option>
      <option value="AT">Austria (+43)</option>
      <option value="AZ">Azerbaijan (+994)</option>
      <option value="BS">Bahamas (+1242)</option>
      <option value="BH">Bahrain (+973)</option>
      <option value="BD">Bangladesh (+880)</option>
      <option value="BB">Barbados (+1246)</option>
      <option value="BY">Belarus (+375)</option>
      <option value="BE">Belgium (+32)</option>
      <option value="BZ">Belize (+501)</option>
      <option value="BJ">Benin (+229)</option>
      <option value="BM">Bermuda (+1441)</option>
      <option value="BT">Bhutan (+975)</option>
      <option value="BO">Bolivia (+591)</option>
      <option value="BA">Bosnia Herzegovina (+387)</option>
      <option value="BW">Botswana (+267)</option>
      <option value="BR">Brazil (+55)</option>
      <option value="BN">Brunei (+673)</option>
      <option value="BG">Bulgaria (+359)</option>
      <option value="BF">Burkina Faso (+226)</option>
      <option value="BI">Burundi (+257)</option>
      <option value="KH">Cambodia (+855)</option>
      <option value="CM">Cameroon (+237)</option>
      <option value="CA">Canada (+1)</option>
      <option value="CV">Cape Verde Islands (+238)</option>
      <option value="KY">Cayman Islands (+1345)</option>
      <option value="CF">Central African Republic (+236)</option>
      <option value="CL">Chile (+56)</option>
      <option value="CN">China (+86)</option>
      <option value="CO">Colombia (+57)</option>
      <option value="KM">Comoros (+269)</option>
      <option value="CG">Congo (+242)</option>
      <option value="CK">Cook Islands (+682)</option>
      <option value="CR">Costa Rica (+506)</option>
      <option value="HR">Croatia (+385)</option>
      <option value="CU">Cuba (+53)</option>
      <option value="CY">Cyprus North (+90392)</option>
      <option value="CY">Cyprus South (+357)</option>
      <option value="CZ">Czech Republic (+42)</option>
      <option value="DK">Denmark (+45)</option>
      <option value="DJ">Djibouti (+253)</option>
      <option value="DM">Dominica (+1809)</option>
      <option value="DO">Dominican Republic (+1809)</option>
      <option value="EC">Ecuador (+593)</option>
      <option value="EG">Egypt (+20)</option>
      <option value="SV">El Salvador (+503)</option>
      <option value="GQ">Equatorial Guinea (+240)</option>
      <option value="ER">Eritrea (+291)</option>
      <option value="EE">Estonia (+372)</option>
      <option value="ET">Ethiopia (+251)</option>
      <option value="FK">Falkland Islands (+500)</option>
      <option value="FO">Faroe Islands (+298)</option>
      <option value="FJ">Fiji (+679)</option>
      <option value="FI">Finland (+358)</option>
      <option value="FR">France (+33)</option>
      <option value="GF">French Guiana (+594)</option>
      <option value="PF">French Polynesia (+689)</option>
      <option value="GA">Gabon (+241)</option>
      <option value="GM">Gambia (+220)</option>
      <option value="GE">Georgia (+7880)</option>
      <option value="DE">Germany (+49)</option>
      <option value="GH">Ghana (+233)</option>
      <option value="GI">Gibraltar (+350)</option>
      <option value="GR">Greece (+30)</option>
      <option value="GL">Greenland (+299)</option>
      <option value="GD">Grenada (+1473)</option>
      <option value="GP">Guadeloupe (+590)</option>
      <option value="GU">Guam (+671)</option>
      <option value="GT">Guatemala (+502)</option>
      <option value="GN">Guinea (+224)</option>
      <option value="GW">Guinea - Bissau (+245)</option>
      <option value="GY">Guyana (+592)</option>
      <option value="HT">Haiti (+509)</option>
      <option value="HN">Honduras (+504)</option>
      <option value="HK">Hong Kong (+852)</option>
      <option value="HU">Hungary (+36)</option>
      <option value="IS">Iceland (+354)</option>
      <option value="IN">India (+91)</option>
      <option value="ID">Indonesia (+62)</option>
      <option value="IR">Iran (+98)</option>
      <option value="IQ">Iraq (+964)</option>
      <option value="IE">Ireland (+353)</option>
      <option value="IL">Israel (+972)</option>
      <option value="IT">Italy (+39)</option>
      <option value="JM">Jamaica (+1876)</option>
      <option value="JP">Japan (+81)</option>
      <option value="JO">Jordan (+962)</option>
      <option value="KZ">Kazakhstan (+7)</option>
      <option value="KE">Kenya (+254)</option>
      <option value="KI">Kiribati (+686)</option>
      <option value="KP">Korea North (+850)</option>
      <option value="KR">Korea South (+82)</option>
      <option value="KW">Kuwait (+965)</option>
      <option value="KG">Kyrgyzstan (+996)</option>
      <option value="LA">Laos (+856)</option>
      <option value="LV">Latvia (+371)</option>
      <option value="LB">Lebanon (+961)</option>
      <option value="LS">Lesotho (+266)</option>
      <option value="LR">Liberia (+231)</option>
      <option value="LY">Libya (+218)</option>
      <option value="LI">Liechtenstein (+417)</option>
      <option value="LT">Lithuania (+370)</option>
      <option value="LU">Luxembourg (+352)</option>
      <option value="MO">Macao (+853)</option>
      <option value="MK">Macedonia (+389)</option>
      <option value="MG">Madagascar (+261)</option>
      <option value="MW">Malawi (+265)</option>
      <option value="MY">Malaysia (+60)</option>
      <option value="MV">Maldives (+960)</option>
      <option value="ML">Mali (+223)</option>
      <option value="MT">Malta (+356)</option>
      <option value="MH">Marshall Islands (+692)</option>
      <option value="MQ">Martinique (+596)</option>
      <option value="MR">Mauritania (+222)</option>
      <option value="YT">Mayotte (+269)</option>
      <option value="MX">Mexico (+52)</option>
      <option value="FM">Micronesia (+691)</option>
      <option value="MD">Moldova (+373)</option>
      <option value="MC">Monaco (+377)</option>
      <option value="MN">Mongolia (+976)</option>
      <option value="MS">Montserrat (+1664)</option>
      <option value="MA">Morocco (+212)</option>
      <option value="MZ">Mozambique (+258)</option>
      <option value="MN">Myanmar (+95)</option>
      <option value="NA">Namibia (+264)</option>
      <option value="NR">Nauru (+674)</option>
      <option value="NP">Nepal (+977)</option>
      <option value="NL">Netherlands (+31)</option>
      <option value="NC">New Caledonia (+687)</option>
      <option value="NZ">New Zealand (+64)</option>
      <option value="NI">Nicaragua (+505)</option>
      <option value="NE">Niger (+227)</option>
      <option value="NG">Nigeria (+234)</option>
      <option value="NU">Niue (+683)</option>
      <option value="NF">Norfolk Islands (+672)</option>
      <option value="NP">Northern Marianas (+670)</option>
      <option value="NO">Norway (+47)</option>
      <option value="OM">Oman (+968)</option>
      <option value="PW">Palau (+680)</option>
      <option value="PA">Panama (+507)</option>
      <option value="PG">Papua New Guinea (+675)</option>
      <option value="PY">Paraguay (+595)</option>
      <option value="PE">Peru (+51)</option>
      <option value="PH">Philippines (+63)</option>
      <option value="PL">Poland (+48)</option>
      <option value="PT">Portugal (+351)</option>
      <option value="PR">Puerto Rico (+1787)</option>
      <option value="QA">Qatar (+974)</option>
      <option value="RE">Reunion (+262)</option>
      <option value="RO">Romania (+40)</option>
      <option value="RU">Russia (+7)</option>
      <option value="RW">Rwanda (+250)</option>
      <option value="SM">San Marino (+378)</option>
      <option value="ST">Sao Tome &amp; Principe (+239)</option>
      <option value="SA">Saudi Arabia (+966)</option>
      <option value="SN">Senegal (+221)</option>
      <option value="CS">Serbia (+381)</option>
      <option value="SC">Seychelles (+248)</option>
      <option value="SL">Sierra Leone (+232)</option>
      <option value="SG">Singapore (+65)</option>
      <option value="SK">Slovak Republic (+421)</option>
      <option value="SI">Slovenia (+386)</option>
      <option value="SB">Solomon Islands (+677)</option>
      <option value="SO">Somalia (+252)</option>
      <option value="ZA">South Africa (+27)</option>
      <option value="ES">Spain (+34)</option>
      <option value="LK">Sri Lanka (+94)</option>
      <option value="SH">St. Helena (+290)</option>
      <option value="KN">St. Kitts (+1869)</option>
      <option value="SC">St. Lucia (+1758)</option>
      <option value="SD">Sudan (+249)</option>
      <option value="SR">Suriname (+597)</option>
      <option value="SZ">Swaziland (+268)</option>
      <option value="SE">Sweden (+46)</option>
      <option value="CH">Switzerland (+41)</option>
      <option value="SI">Syria (+963)</option>
      <option value="TW">Taiwan (+886)</option>
      <option value="TJ">Tajikstan (+7)</option>
      <option value="TH">Thailand (+66)</option>
      <option value="TG">Togo (+228)</option>
      <option value="TO">Tonga (+676)</option>
      <option value="TT">Trinidad &amp; Tobago (+1868)</option>
      <option value="TN">Tunisia (+216)</option>
      <option value="TR">Turkey (+90)</option>
      <option value="TM">Turkmenistan (+7)</option>
      <option value="TM">Turkmenistan (+993)</option>
      <option value="TC">Turks &amp; Caicos Islands (+1649)</option>
      <option value="TV">Tuvalu (+688)</option>
      <option value="UG">Uganda (+256)</option>
      <option value="GB">UK (+44)</option>
      <option value="UA">Ukraine (+380)</option>
      <option value="AE">United Arab Emirates (+971)</option>
      <option value="UY">Uruguay (+598)</option>
      <option value="US">USA (+1)</option>
      <option value="UZ">Uzbekistan (+7)</option>
      <option value="VU">Vanuatu (+678)</option>
      <option value="VA">Vatican City (+379)</option>
      <option value="VE">Venezuela (+58)</option>
      <option value="VN">Vietnam (+84)</option>
      <option value="VG">Virgin Islands - British (+1284)</option>
      <option value="VI">Virgin Islands - US (+1340)</option>
      <option value="WF">Wallis &amp; Futuna (+681)</option>
      <option value="YE">Yemen (North)(+969)</option>
      <option value="YE">Yemen (South)(+967)</option>
      <option value="ZM">Zambia (+260)</option>
      <option value="ZW">Zimbabwe (+263)</option>

@DevDhaif
Copy link

DevDhaif commented Apr 16, 2022

Yemen is not divided into two countries, it's only one country and the correct phone key is (+967).
also you need to add Palastine (PS) (+970)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment