ISO 3166 country list: nicely formatted in CSV and SQL format

[updated 2014-06-29]

I recently had to add a country selection list on a form on the website of a customer who does business internationally, and couldn’t find an up-to-date, easy-to-use list of countries already available. The closest was the ISO 3166 country list (HTML version here), but there are a few issues with it in my opinion:

  • Country names are all capitalized, which makes them a bit harder to read (UNITED ARAB EMIRATES vs United Arab Emirates for example)
  • They list official country names, which can sometimes be quite long even in their “short” version, such as MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF.

I therefore took their latest list of 249 countries (as of February 2012) and fixed the capitalization/shortened the names of a few countries to more usual ones (e.g. Macedonia instead of MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF). I did the same with the list of French country names and merged the English and French lists together, resulting in a table with the following 3 columns:

  • ISO 3166 country code
  • English Name
  • French Name

These are free for everyone to download and redistribute. I hope it saves you some time.

Downloads – files last updated 2014-06-29

ISO 3166 country code/country name list – Excel format

ISO 3166 country code/country name list – CSV format

ISO 3166 country code/country name list – SQL format (creates an InnoDB table named countries with MySQL syntax)

53 thoughts on “ISO 3166 country list: nicely formatted in CSV and SQL format

  1. Saved me some time, too. Thanks.

    A note: Côte d’Ivoire is incomplete in the spreadsheet. Everything after “d” is missing.

  2. Nice files, thanks, but the CSV has two lines that failed (quotes export problem):
    CI,”Côte D'”,”Côte d”
    LA,”Lao People”,Laos

  3. Thanks so much for this. But can you make the sql format in *.sql instead of the *.txt. This will help people viewing from mobile phones to download it instead for it to open in their browser. Thanks

  4. You have a very bad example on you intro text.

    There is no country named Macedonia. They are called FYROM.

    Macedonia is an ancient Greek empire. They cannot call themselves Macedonias for the same reason that Egyptians or Syrians don’t.

    The international community does not recognize a country by that name and you should not use it to describe this country.

    Thank you!

  5. Useful, as I am combining data from multiple databases, including one in France, and only just noticed the country differences. With this, will make a Global Reporting country field (using the English version since that data outnumbers all the others) and keep both.

Leave a Reply

Your email address will not be published. Required fields are marked *