List of All Countries in All Languages and All Data Formats

The scenario is simple – I need a list of all countries. This is the task that need to be solved in majority of applications. So I sit down and tried to find a good solution for this problem. No matter which programming language or data format you use in your application or language you speak, this country list will suit your needs.

I actually wrote a piece of PHP code which generates a list of all country names with ISO 3166-1 codes.


Available in All Data Formats

Formats available:

New formats will be added in the future. Please feel free to suggest your favorite data formats.

Everybody Needs a Country Table

For developers, this is the most common case, they simply need a country table for their database. There are few SQL dumps for each DBMS:

Country Flags

Thanks to world-flags-sprite project I was able to generate special HTML version which includes country flags. You can see demo page here. It’s just simple list, so I encourage you to iterate on it.


All formats are also available in multiple languages, please find full language list here.

Where Does the Data Come From?

For now, I have implemented two data importers:

So, if country list changes in the future, it will be very easy to update our country list.

All contributions, Ideas and Suggestions are Welcome

Source code for this project is hosted on github. Feel free to fork it and play with it, once you change something, just run build script and it will rebuild all country files. I will be receiving any pull requests which improve this tool. You can add new formats, new data sources or suggest improvements in comments. If you find any bug, you can report it here.

Adding New Formats and Data Sources

To add new data format just extend Exporter and implement export() method from ExporterInterface. Similar pattern applies to importers.

Use it and Give Your Feedback

I hope someone will find this country list useful. Feel free to give your feedback and join this project.

  • Steven

    South Sudan (ISO Code: SS) is not included.

    • umpirsky

      Thanks for your feedback, I opened a pull request in Symfony Locale component Once they merge that, I will rebuild country list and this will be fixed.

    • Roland

      south sudan is a fake country. Made by George Clooney, to provide free oil for the white man

      • Andre

        Wtf dude? What kind of drug you’re into? LOL

      • kriansa


  • Sdf

    County codes are wrong…

    • umpirsky

      Can you be more specific please? Which code for example?

  • Toni

    Some frameworks like .NET already contain this list. In addition you get all the culture specific things (thousands separator, date formats etc.).

    • umpirsky

      Yes. Some PHP frameworks (like Symfony and Zend) contain this list as well, I actually used one to fetch this data. Sometimes is handy to have table in database, and sometimes you don’t use a framework, that’s where this list jumps in.

  • Guest

    Since when is PHP a “format”? Where are the Perl/Ruby/Python/etc. arrays?

    • umpirsky

      If PHP is not a format in which data can be represented, then Perl/Ruby/Python are not as well. I would like to add Perl/Ruby/Python, so pull request would be very appreciated.

  • Kyle

    UTF-8 XML file contains following invalid characters:
    Å (0xC5), ô (0xF4), ’ (0×92), é (0xE9), ã (0xE3), í (0xED)

    • Kyle

      Disregard last, my browser straight from github.

      Nice work

  • Jalapeno

    how about including flags?

  • Pingback: Bleak. Wednesday! « myblux

  • Andrea Baron

    What about a full all-countries-all-languages dump? I started to build something like that times ago by parsing wikipedia pages, but ended up after adding italian and english (those I really needed). So someone might need something like that, don’t you think?
    Thanks anyway, it would be very useful to anyone.

  • Tommy

    If /cy/ is supposed to be Welsh (Cymraeg) as per ISO code, the names of many countries are wrong. The list is mostly just in English. Many European countries have a different name in Welsh, for example Germany is ‘Yr Almaen’. The name you have for the UK is the name of the Island not the country. ‘Prydain Fawr’ = Great Britain. ‘Y Deyrnas Unedig’ = United Kingdom. The full name of the country ‘United Kingdom of Great Britain and Northern Ireland’ would be ‘Teyrnas Unedig Prydain Fawr a Gogledd Iwerddon’

  • Anon

    Been looking for something like this for a while now. You, Sir, are a genius!

  • Pingback: Una lista multilingua di tutte le nazioni in tutti i formati | Mr.Webmaster Blog

  • David Walsh

    Netherlands Antilles (AN) is no longer. It split up into three separate entities.

    EDIT: Never mind. I see that was included in the pull request below.

    • umpirsky

      Exactly, thanks anyway.

  • dacay

    Nice work! Turkish countries are all correct, but in some languages (like AF) English names are used.

  • Nema

    There’s no more Serbia and Montenegro (2003-2006)

    • umpirsky

      Thanks, I will address this to ICU. I also work on alternate solution to fetch data from CLDR.

      • Me

        Do you know ruby-cldr?

        • umpirsky

          Now I know, looks interesting, thanks.

  • Antony

    I always like to have an “alternate name” field included with my country data. E.g Netherlands might be Holland or Nederlands. This allows for ux experience such as the follow:

  • Iwan Luijks

    You could double check your data with the WorldBank API (, or maybe use that one in addition to your datasource now :) .

  • knalli

    Nice idea. There is another thing which is very similar: time zones. And they can change sometimes, perhaps more likely than country codes. Do anyone have an idea where we could grab this data from? Ideally, this should be later automatic, too.

  • Luhkamaeni

    This is format HTML

  • Waqas

    Good Work…

  • Julian Raschke

    This must be the first webdesign resource that got Taiwan right on the first try! Even the flag.

  • Facundo

    Hi everyone,
    I’m looking for a list of world languages (currently spoken) to load on a website’s DB. Does anyone know of a good resource. All I could find so far doesn’t seem very accurate. Ideally, my goal is to find a list that has values like the ones Facebook would offer such as “Spanish (Argentina)” “Spanish (México)”.
    Thanks for reading

  • Louis Ferreira

    What about a list of countries and the continents they form part of?

    • umpirsky

      Well, I would like to keep it plain and simple :) How do you mean to format exported data in that case?

  • Ranomyrro-313

    Do you know where I can find a simple many-to-many table:
    Country ISO code | Official Language ISO code

    doesn’t matter which one which ISO standards 2 or 3 letters, just so it will be consist. CSV or SQL format.

    Thanks in advance.

    • umpirsky

      Is this good enough? Zend locale uses CLDR data.

  • Jasminesccott

    What the hell????

  • Kamugo

    Do you know if there is something similar with ISO 639-1 (languages)? Thanks

  • Hayleyjchivers

    Hi ,y name is hayley

  • Rohit5

    This is amazing list, thanks for sharing it.

  • Dobrosław Żybort

    Thank you for that list, but maybe you can also add three-letter country codes (ISO 3166-1 alpha-3)?

  • Lenster

    This is a great resource many thanks for your efforts! What would be equally useful (to me at least) is a list-of-all-languages-in-all-languages-and-all-data-formats

    So for example:
    English: German
    German: Deutsch
    French: Allemand

    • umpirsky

      Yes, I have plans for that. It will be easy to add this, the hardest part is renaming the project :)

      • BlackHatMario

        Hi, what about your plans? I have been waiting for this 1 year and need it very bad

        • umpirsky

          No time to do it now, but will accept pull requests.

      • Justin Zammit

        I am working on a project where I need the list of all world spoken languages specifically in (English, Dutch, German, French, Italian, Spanish, Portuguese, Romanian and Hungarian). Did you develop such thing yet or do you know from where I can get such data? Thank you in advance.

        • umpirsky

          No, but I know there is such information in both ICU and CLDR databases.

  • Ziaries

    can you do a list of words in all spoken languages in the world, with the english translation for all the words, as a database?

    • umpirsky

      That one is hard to get :)

    • kriansa

      You gotta be kidding him.

  • krunal shah

    Thanks for the list. its very useful :)

  • Connie

    Thank you for your work!

  • La

    Dear Sir, have under consideration that Macedonia is a continent and not a country. see
    F.Y.R.O.M. or Republic of Macedonia is the apropriate name and this name is also partially recognized by EU members including the Greek member.
    Off course this is not the place for nationallity issues but it’s an issue of accuracy of your data since this is not a programming project and more of a resource project.

    • umpirsky

      I know. But I am not creator of this data, I’m just putting it in various handy formats. Please refer to ICU and CLDR projects since that are 2 data sources I used for this project.

  • Prashanth Randadath

    thank you very much for this very useful data

  • Wesam Alalem

    Hi, great job you did here. just one note, Libya’s flag has changed, check the new one at:

  • Vusi Ben Noah

    Zimbabwe flag is incorrect.

  • Remo

    East Germany isn’t a country

    • umpirsky

      That is the problem in CLDR database, feel free to report it. You can use ICU data instead.

  • Bart Calixto

    Problem is: For real application you will need to expand iso 3166.
    Wales, Scotland and many more aren’t on that list, yet they have different flags and currency than GB (United Kingdom) while you should want to use same ‘code’ but it’s defined as a PK. So you have to implement new codes or use another ID for PK.

    • umpirsky

      Wales and Scotland are states (correct me if I’m wrong), this list is for countries. Regarding ID, this is just a simple table, you can always alter or select-insert to make table to suit your needs.

      • Bart Calixto

        Wales is a country that is part of the United Kingdom … (from wikipedia)

        • umpirsky

          Thanks. This should be addressed to ICU/CLDR.

  • Eric Esquivel


  • Eric Esquivel

    somebody has the United Nation M49 dataset with Sub-regions?

  • Björn Skarner

    What a great resource! Thank you for sharing it with the world.

    Was thinking of extending this with currencies and coordinates.
    Hope it is ok if I make use of this library?

    • umpirsky

      Sure, that would be awesome. You can share details, maybe I can help. Will you fetch data from ICU/CLDR?

  • Björn Skarner

    Not that far along in my plans, will pick it up as a weekend project.
    I’ll provide more details as it progresses.
    Will look into which resource to use, but will probably continue the use of ICU/CLDR.
    Think the biggest issue will be to collect the coordinates from an open source.

  • Erik Pöhler

    does anybody have a similar list for all locales? or could I extract them from your repo? nice resource. cheers

  • Erik Pöhler

    actually with this XPath “//table//a[contains(@class,'js-directory-link')]” I could get all the locales from the HTML of the GitHub cldr page. :)

  • Oscar

    Sr. You make my day. Thank you so much! =)

  • xeryan

    can you make even a list of languages with her native name (not country) ?

  • shaviTF

    Hey.. what about one list of all language and countries each one in its own language?

  • Cron

    Might it be possible to convert this list to ISO639-1? I need flags of language codes rather than country codes. For example, en-gb is Britain, EL is Greece rather than GR.

  • ritesh Andaz


  • qwerty

    Gereat work! The only point is : if i need translations of country list to some languages I have to download each translation separetely. The best thing would be to make a general DB table with all country names in all languages.

    • umpirsky

      It’s easy to generate such table. It’s open source, so anyone can take some time to do it.

  • Juan Escobar

    What about cities? anyone know where I can find it? And thank you for the countries, really helpful.

  • Bernhard Schussek

    For the record, I’m in the process of overhauling the API of the Symfony2 Intl component to provide access to much more data than it currently provides. Basically, I’m creating a clone of ICU4J/ICU4C (the official ICU APIs) for PHP.

    This will most likely make it into Symfony 2.5. The current WIP can be seen here:

    • umpirsky

      Yes, I saw your PR. Very cool. Thanks for the heads up!

  • .CW Registry Curacao

    As you probably know CURACAO, SAINT MAARTEN, BONAIRE, SABA and SAINT EUSTATIUS used to be part of the NETHERLANDS ANTILLES and since October 10, 2010 the NETHERLANDS ANTILLES
    were dissolved and new countries were born (reference links: and

    However the last 2 years we are
    confronted with the fact that our new countries are not appearing on the
    country lists on several (business) websites, and on the other hand the
    NETHERLANDS ANTILLES is been removed without having been replaced by CURACAO, SAINT
    MAARTEN and BES islands.

    This causes several registration
    issues when making use of e-Commerce sites, but is also making e-Business in
    general more difficult and as you can understand this has its effects on the
    economics of the new countries.

    As the manager of the .AN
    Registry responsible for .AN being phased out accordingly and on the other hand
    also the manager of the .CW Registry for CURACAO (and concerned also for the
    .SX Registry and future .BQ Registry), I am requesting your all help on how we
    can have these updates made in the country list databases all over the WWW

    Other reference links:

    Best regards,

    Leendert J.J.Pengel

    .CW Registry of Curacao (.AN Registry former Netherlands Antilles)

    • umpirsky

      This country list is based on icu and cldr databases. So, that is the place where you should look for an update.

      • Mike

        These countries are already updated at CLDR 24 (14-09-2013)… We have the same problem, Zend 1 and 2 do not list the new countries, thus Magento is also not listing these countries. Even for Magento 1.8 released 25-09-2013. We got orders with user comments like: “I selected Aruba because there was no Curacao, please ship to Curacao.”

        Aruba Aruba AW
        Caribbean Netherlands Caribisch Nederland BQ
        Curaçao Curaçao CW
        Sint Maarten Sint-Maarten SX

  • Dean Jones

    I have also the country and the flag database dump. You can check it here on

  • Dean Jones

    You can also check the database dump for country,flag and ISO code here

  • G Rodriguez

    Awesome resource. I’m curious, which source (ICU or CLDR) is considered to be more reliable?

  • Ashraf Badr Elden

    the best resource of countries ever !

  • yahya ehsan

    Very helpful as I used in my project. Thanks for the great effort

  • John Imrie

    For Perl Programmers I’d like to plug my Locale::CLDR module which will give you a list of all Country names in all 709 CLDR Locals

  • hprmrkt

    CAN I dragged pictures on the site and use them as intended?

  • rachid

    the biggest african country is not listed in flag list

  • devChirp

    here is one more with little more information

  • shareef

    please add state and city table too

    • yo yo yo mdf

      will be good to have a “standard” reference :D

  • eduardo money maker

    THANKS to save us worth time :D LOVE from México :P :P :P

  • iBoemba

    Awesome!! Great Thanks