Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Countries without postal codes
COUNTRIES_WITHOUT_POSTCODES = [
[ "Angola", "AO" ],
[ "Antigua and Barbuda", "AG" ],
[ "Aruba", "AW" ],
[ "Bahamas", "BS" ],
[ "Belize", "BZ" ],
[ "Benin", "BJ" ],
[ "Botswana", "BW" ],
[ "Burkina Faso", "BF" ],
[ "Burundi", "BI" ],
[ "Cameroon", "CM" ],
[ "Central African Republic", "CF" ],
[ "Comoros", "KM" ],
[ "Congo", "CG" ],
[ "Congo, the Democratic Republic of the", "CD" ],
[ "Cook Islands", "CK" ],
[ "Cote d'Ivoire", "CI" ],
[ "Djibouti", "DJ" ],
[ "Dominica", "DM" ],
[ "Equatorial Guinea", "GQ" ],
[ "Eritrea", "ER" ],
[ "Fiji", "FJ" ],
[ "French Southern Territories", "TF" ],
[ "Gambia", "GM" ],
[ "Ghana", "GH" ],
[ "Grenada", "GD" ],
[ "Guinea", "GN" ],
[ "Guyana", "GY" ],
[ "Hong Kong", "HK" ],
[ "Ireland", "IE" ],
[ "Jamaica", "JM" ],
[ "Kenya", "KE" ],
[ "Kiribati", "KI" ],
[ "Macao", "MO" ],
[ "Malawi", "MW" ],
[ "Mali", "ML" ],
[ "Mauritania", "MR" ],
[ "Mauritius", "MU" ],
[ "Montserrat", "MS" ],
[ "Nauru", "NR" ],
[ "Netherlands Antilles", "AN" ],
[ "Niue", "NU" ],
[ "North Korea", "KP" ],
[ "Panama", "PA" ],
[ "Qatar", "QA" ],
[ "Rwanda", "RW" ],
[ "Saint Kitts and Nevis", "KN" ],
[ "Saint Lucia", "LC" ],
[ "Sao Tome and Principe", "ST" ],
[ "Saudi Arabia", "SA" ],
[ "Seychelles", "SC" ],
[ "Sierra Leone", "SL" ],
[ "Solomon Islands", "SB" ],
[ "Somalia", "SO" ],
[ "South Africa", "ZA" ],
[ "Suriname", "SR" ],
[ "Syria", "SY" ],
[ "Tanzania, United Republic of", "TZ" ],
[ "Timor-Leste", "TL" ],
[ "Tokelau", "TK" ],
[ "Tonga", "TO" ],
[ "Trinidad and Tobago", "TT" ],
[ "Tuvalu", "TV" ],
[ "Uganda", "UG" ],
[ "United Arab Emirates", "AE" ],
[ "Vanuatu", "VU" ],
[ "Yemen", "YE" ],
[ "Zimbabwe", "ZW" ]
]

Somalia hove no zip or postal

South Africa does have postal codes.

tosbourn commented Jun 5, 2016

Thanks so much for this list. I compared to to this wikipedia page and there are a few discrepancies. I've written them up here

jonazri commented Dec 10, 2016

Israel has postal codes but does not require them for mail delivery and they are rarely used.

gasner commented Apr 3, 2017

in json
[ { "name": "Angola", "code": "AO" }, { "name": "Antigua and Barbuda", "code": "AG" }, { "name": "Aruba", "code": "AW" }, { "name": "Bahamas", "code": "BS" }, { "name": "Belize", "code": "BZ" }, { "name": "Benin", "code": "BJ" }, { "name": "Botswana", "code": "BW" }, { "name": "Burkina Faso", "code": "BF" }, { "name": "Burundi", "code": "BI" }, { "name": "Cameroon", "code": "CM" }, { "name": "Central African Republic", "code": "CF" }, { "name": "Comoros", "code": "KM" }, { "name": "Congo", "code": "CG" }, { "name": "Congo, the Democratic Republic of the", "code": "CD" }, { "name": "Cook Islands", "code": "CK" }, { "name": "Cote d'Ivoire", "code": "CI" }, { "name": "Djibouti", "code": "DJ" }, { "name": "Dominica", "code": "DM" }, { "name": "Equatorial Guinea", "code": "GQ" }, { "name": "Eritrea", "code": "ER" }, { "name": "Fiji", "code": "FJ" }, { "name": "French Southern Territories", "code": "TF" }, { "name": "Gambia", "code": "GM" }, { "name": "Ghana", "code": "GH" }, { "name": "Grenada", "code": "GD" }, { "name": "Guinea", "code": "GN" }, { "name": "Guyana", "code": "GY" }, { "name": "Hong Kong", "code": "HK" }, { "name": "Ireland", "code": "IE" }, { "name": "Jamaica", "code": "JM" }, { "name": "Kenya", "code": "KE" }, { "name": "Kiribati", "code": "KI" }, { "name": "Macao", "code": "MO" }, { "name": "Malawi", "code": "MW" }, { "name": "Mali", "code": "ML" }, { "name": "Mauritania", "code": "MR" }, { "name": "Mauritius", "code": "MU" }, { "name": "Montserrat", "code": "MS" }, { "name": "Nauru", "code": "NR" }, { "name": "Netherlands Antilles", "code": "AN" }, { "name": "Niue", "code": "NU" }, { "name": "North Korea", "code": "KP" }, { "name": "Panama", "code": "PA" }, { "name": "Qatar", "code": "QA" }, { "name": "Rwanda", "code": "RW" }, { "name": "Saint Kitts and Nevis", "code": "KN" }, { "name": "Saint Lucia", "code": "LC" }, { "name": "Sao Tome and Principe", "code": "ST" }, { "name": "Saudi Arabia", "code": "SA" }, { "name": "Seychelles", "code": "SC" }, { "name": "Sierra Leone", "code": "SL" }, { "name": "Solomon Islands", "code": "SB" }, { "name": "Somalia", "code": "SO" }, { "name": "South Africa", "code": "ZA" }, { "name": "Suriname", "code": "SR" }, { "name": "Syria", "code": "SY" }, { "name": "Tanzania, United Republic of", "code": "TZ" }, { "name": "Timor-Leste", "code": "TL" }, { "name": "Tokelau", "code": "TK" }, { "name": "Tonga", "code": "TO" }, { "name": "Trinidad and Tobago", "code": "TT" }, { "name": "Tuvalu", "code": "TV" }, { "name": "Uganda", "code": "UG" }, { "name": "United Arab Emirates", "code": "AE" }, { "name": "Vanuatu", "code": "VU" }, { "name": "Yemen", "code": "YE" }, { "name": "Zimbabwe", "code": "ZW" } ]

aleclarson commented Jul 18, 2017

Thanks for the comprehensive list, @kennwilson. Here are some corrections:

  • Colombia does NOT use postcodes, according to this link.
  • Ireland has postcodes, according to this link.
  • Israel has postcodes, according to this link.
  • Namibia does NOT have postcodes, according to this link.
  • Saudi Arabia has postcodes, according to this link.
  • South Africa has postcodes, according to this link.

I did not check all countries (only the ones I ship to). Cheers! 🎉

Edit: According to the UPU, it looks like Namibia does have postcodes. Sorry!

Edit 2: According to the UPU, it looks like Colombia does have postcodes. Sorry!

Chile has postal code but is not mandatory and rarely used.

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