PHPackages                             stefangabos/world\_countries - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. stefangabos/world\_countries

ActiveLibrary[Database &amp; ORM](/categories/database)

stefangabos/world\_countries
============================

Constantly updated lists of world countries, territories and areas of geographical interest, with associated alpha-2, alpha-3 and numeric codes as defined by the ISO 3166-1 standard, available in multiple formats and languages, with national flags included

3.3.0(6mo ago)1.6k122.7k—6.9%392[6 issues](https://github.com/stefangabos/world_countries/issues)[1 PRs](https://github.com/stefangabos/world_countries/pulls)1LGPL-3.0PHPCI passing

Since Oct 17Pushed 6mo ago46 watchersCompare

[ Source](https://github.com/stefangabos/world_countries)[ Packagist](https://packagist.org/packages/stefangabos/world_countries)[ RSS](/packages/stefangabos-world-countries/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)DependenciesVersions (19)Used By (1)

[![zebrajs](https://raw.githubusercontent.com/stefangabos/zebrajs/master/docs/images/logo.png)](https://raw.githubusercontent.com/stefangabos/zebrajs/master/docs/images/logo.png)

World countries [![Tweet](https://camo.githubusercontent.com/cb820a0ecc9645168e33b03925d7f14691262ddbaeaf66a0a91697803d0cba2d/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f75726c2f687474702f736869656c64732e696f2e7376673f7374796c653d736f6369616c)](https://twitter.com/intent/tweet?text=Constantly+updated+lists+of+world+countries+with+associated+ISO+3166-1+alpha-2%2C+alpha-3+and+numeric+codes%2C+available+in+multiple+formats+and+languages%2C+with+national+flags+included&url=https://github.com/stefangabos/world_countries&via=stefangabos)
===========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#world-countries-)

*available in multiple languages, in CSV, JSON, PHP, MySQL, MSSQL and XML formats, with associated codes as defined by the ISO 3166 standard, and with national flags included; also available are the ISO 3166-2 codes used for identifying the principal subdivisions (e.g., provinces or states) of all countries coded in ISO 3166-1*

[![npm](https://camo.githubusercontent.com/06ed45c28f2233806d42dc2e8e7dd16709ee74cd97d8bd7f5148dac899a9bfc1/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f776f726c645f636f756e74726965735f6c697374732e737667)](https://www.npmjs.com/package/world_countries_lists) [![Total](https://camo.githubusercontent.com/af98da53c311a0eba9ce930ce2cafeb08a3b87b18add412fcb4a032befe3df90/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f64742f776f726c645f636f756e74726965735f6c697374732e737667)](https://www.npmjs.com/package/world_countries_lists) [![Monthly](https://camo.githubusercontent.com/f5f4d1e6263aaad14fa44b1f43f0a746ef323558f531856d62e0f8ca7ee7cb57/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f646d2f776f726c645f636f756e74726965735f6c697374732e737667)](https://www.npmjs.com/package/world_countries_lists) [![JSDelivr](https://camo.githubusercontent.com/88851f5ed52a42225df0cd984cef28a63fac34b4c0af4b8bb2c4284a91acbf93/68747470733a2f2f646174612e6a7364656c6976722e636f6d2f76312f7061636b6167652f6e706d2f776f726c645f636f756e74726965735f6c697374732f62616467653f7374796c653d726f756e646564)](https://www.jsdelivr.com/package/npm/world_countries_lists) [![License](https://camo.githubusercontent.com/8d344f454884963cc76a2e4360010311965abebe11ca5839b84a2aa337e0200a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f73746566616e6761626f732f776f726c645f636f756e74726965732e737667)](https://github.com/stefangabos/world_countries/blob/master/LICENSE.md)

Constantly updated lists of world countries, territories and areas of geographical interest, with associated *alpha-2*, *alpha-3* and *numeric codes* as defined by the *ISO 3166-1* standard, published and maintained by the [International Organization for Standardization](https://www.iso.org/iso-3166-country-codes.html), available in `CSV`, `JSON`, `PHP`, `MySQL`, `MSSQL` and `XML` formats, in multiple languages and with national flags included. Also available are the ISO 3166-2 codes used for identifying the principal subdivisions (e.g., provinces or states) of all countries coded in ISO 3166-1.

In the language folders (inside `data/countries`) you will find files named in two different ways:

File namesContent*world.*\*Files named like this contain all the **249** countries, territories, and areas of geographical interest that have an officially assigned *ISO 3166-1* code.*countries.*\*Files named like this contain the **193** sovereign states (commonly referred to as *countries*) that are members of the [United Nations (UN)](https://www.un.org/about-us/member-states) .> Note that there are 206 sovereign states in the world, the 11 states that are missing from the *countries* list being the ones having their sovereignty disputed. See the list of [sovereign states](https://en.wikipedia.org/wiki/List_of_sovereign_states) with information on their status and recognition of their sovereignty.

The files contain:

- the **ISO 3166-1 numeric** country codes
- the **ISO 3166** official short names in *English*[1](#footnote)
- the **ISO 3166-1 alpha-2** two-letter country codes[2](#footnote2)
- the **ISO 3166-1 alpha-3** three-letter country codes[2](#footnote2)

1 for other languages the country names are in that particular language
2 ISO 3166-1 alpha codes are uppercase but this library provides them in lowercase

The lists are currently available in **37 languages**:

- Arabic
- Armenian
- Basque
- Breton
- Bulgarian
- Chinese (Simplified)
- Chinese (Traditional)
- Croatian
- Czech
- Danish
- Dutch
- English
- Esperanto
- Estonian
- Farsi
- Finnish
- French
- German
- Greek
- Hungarian
- Italian
- Japanese
- Korean
- Lithuanian
- Norwegian
- Polish
- Portuguese
- Romanian
- Russian
- Serbian
- Slovak
- Slovenian
- Spanish
- Swedish
- Thai
- Turkish
- Ukrainian

> The language folders are named based on the [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) standard.

ISO 3166-2 codes
----------------

[](#iso-3166-2-codes)

The project also tries to be a comprehensive and up-to-date source for **ISO 3166-2** which defines codes for identifying the principal subdivisions (e.g., provinces or states) of all countries coded in ISO 3166-1.

The purpose of ISO 3166-2 is to establish an international standard of short and unique alphanumeric codes to represent the relevant administrative divisions and dependent territories of all countries in a more convenient and less ambiguous form than their full names. Each complete ISO 3166-2 code consists of two parts, separated by a hyphen:

`US-TX` for Texas, USA

The first part is the ISO 3166-1 alpha-2 code of the country; The second part is a string of up to three alphanumeric characters, which is usually obtained from national sources and stems from coding systems already in use in the country concerned, but may also be developed by the ISO itself. Each complete ISO 3166-2 code can then be used to uniquely identify a country subdivision in a global context.

The list is available in `CSV`, `JSON`, `PHP`, `MySQL`, `MSSQL` and `XML` formats in the `data/subdivisions` folder and the lists contain:

- the **country code**
- the **ISO 3166-2 subdivision code**
- the **ISO 3166-2 subdivision name**
- the **subdivision name in english** *(where available)*
- the **subdivision type**
- the **parent** (for when there are multiple administrative levels)

An excerpt from the CSV file looks like this

```
US,US-AL,Alabama,,state,
US,US-AK,Alaska,,state,
US,US-AZ,Arizona,,state,
US,US-AR,Arkansas,,state,
US,US-CA,California,,state,
US,US-CO,Colorado,,state,
```

> Note that english name for subdivisions is not available for all and also that it is not duplicated if the original ISO 3166-2 name is already in english!

License
-------

[](#license)

The country and subdivision data is sourced from [Wikipedia's ISO 3166-1 pages](https://en.wikipedia.org/wiki/ISO_3166-1) and [Wikipedia's ISO 3166-2 pages](https://en.wikipedia.org/wiki/ISO_3166-2), and is licensed under the [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/).

Flags
-----

[](#flags)

The package also contains the national flags of each country in multiple styles. The image files are named using the ISO 3166-1-alpha-2 code of the country they represent, for easily pairing flags with countries.

In `/data/flags/default/` you will find 16x16, 24x24, 32x32, 48x48, 64x64 and 128x128 PNG images looking like the ones below. The images were available for free on the now defunct `icondrawer.com`

[![](https://github.com/stefangabos/world_countries/raw/master/data/flags/default/64x64/gb.png?raw=true)](https://github.com/stefangabos/world_countries/blob/master/data/flags/default/64x64/gb.png?raw=true)

[![](https://github.com/stefangabos/world_countries/raw/master/data/flags/default/64x64/de.png?raw=true)](https://github.com/stefangabos/world_countries/blob/master/data/flags/default/64x64/de.png?raw=true)

[![](https://github.com/stefangabos/world_countries/raw/master/data/flags/default/64x64/fr.png?raw=true)](https://github.com/stefangabos/world_countries/blob/master/data/flags/default/64x64/fr.png?raw=true)

[![](https://github.com/stefangabos/world_countries/raw/master/data/flags/default/64x64/it.png?raw=true)](https://github.com/stefangabos/world_countries/blob/master/data/flags/default/64x64/it.png?raw=true)

[![](https://github.com/stefangabos/world_countries/raw/master/data/flags/default/64x64/us.png?raw=true)](https://github.com/stefangabos/world_countries/blob/master/data/flags/default/64x64/us.png?raw=true)

[![](https://github.com/stefangabos/world_countries/raw/master/data/flags/default/64x64/pt.png?raw=true)](https://github.com/stefangabos/world_countries/blob/master/data/flags/default/64x64/pt.png?raw=true)

[![](https://github.com/stefangabos/world_countries/raw/master/data/flags/default/64x64/es.png?raw=true)](https://github.com/stefangabos/world_countries/blob/master/data/flags/default/64x64/es.png?raw=true)

[![](https://github.com/stefangabos/world_countries/raw/master/data/flags/default/64x64/br.png?raw=true)](https://github.com/stefangabos/world_countries/blob/master/data/flags/default/64x64/br.png?raw=true)

[![](https://github.com/stefangabos/world_countries/raw/master/data/flags/default/64x64/dk.png?raw=true)](https://github.com/stefangabos/world_countries/blob/master/data/flags/default/64x64/dk.png?raw=true)

In `/data/flags/flat/` you will find 16x12, 24x18, 32x24, 48x36, 64x48 and 128x96 PNG images looking like the ones below. The images are taken from the AWESOME .

[![](https://github.com/stefangabos/world_countries/raw/master/data/flags/flat/64x48/gb.png?raw=true)](https://github.com/stefangabos/world_countries/blob/master/data/flags/flat/64x48/gb.png?raw=true)

[![](https://github.com/stefangabos/world_countries/raw/master/data/flags/flat/64x48/de.png?raw=true)](https://github.com/stefangabos/world_countries/blob/master/data/flags/flat/64x48/de.png?raw=true)

[![](https://github.com/stefangabos/world_countries/raw/master/data/flags/flat/64x48/fr.png?raw=true)](https://github.com/stefangabos/world_countries/blob/master/data/flags/flat/64x48/fr.png?raw=true)

[![](https://github.com/stefangabos/world_countries/raw/master/data/flags/flat/64x48/it.png?raw=true)](https://github.com/stefangabos/world_countries/blob/master/data/flags/flat/64x48/it.png?raw=true)

[![](https://github.com/stefangabos/world_countries/raw/master/data/flags/flat/64x48/us.png?raw=true)](https://github.com/stefangabos/world_countries/blob/master/data/flags/flat/64x48/us.png?raw=true)

[![](https://github.com/stefangabos/world_countries/raw/master/data/flags/flat/64x48/pt.png?raw=true)](https://github.com/stefangabos/world_countries/blob/master/data/flags/flat/64x48/pt.png?raw=true)

[![](https://github.com/stefangabos/world_countries/raw/master/data/flags/flat/64x48/es.png?raw=true)](https://github.com/stefangabos/world_countries/blob/master/data/flags/flat/64x48/es.png?raw=true)

[![](https://github.com/stefangabos/world_countries/raw/master/data/flags/flat/64x48/br.png?raw=true)](https://github.com/stefangabos/world_countries/blob/master/data/flags/flat/64x48/br.png?raw=true)

[![](https://github.com/stefangabos/world_countries/raw/master/data/flags/flat/64x48/dk.png?raw=true)](https://github.com/stefangabos/world_countries/blob/master/data/flags/flat/64x48/dk.png?raw=true)

In `/data/flags/flat-waving/` you will find 16x12, 24x18, 32x24, 48x36, 64x48 and 128x96 PNG images looking like the ones below. The images are taken from [flagpedia.net](https://flagpedia.net/)

[![](https://github.com/stefangabos/world_countries/raw/master/data/flags/flat-waving/64x48/gb.png?raw=true)](https://github.com/stefangabos/world_countries/blob/master/data/flags/flat-waving/64x48/gb.png?raw=true)

[![](https://github.com/stefangabos/world_countries/raw/master/data/flags/flat-waving/64x48/de.png?raw=true)](https://github.com/stefangabos/world_countries/blob/master/data/flags/flat-waving/64x48/de.png?raw=true)

[![](https://github.com/stefangabos/world_countries/raw/master/data/flags/flat-waving/64x48/fr.png?raw=true)](https://github.com/stefangabos/world_countries/blob/master/data/flags/flat-waving/64x48/fr.png?raw=true)

[![](https://github.com/stefangabos/world_countries/raw/master/data/flags/flat-waving/64x48/it.png?raw=true)](https://github.com/stefangabos/world_countries/blob/master/data/flags/flat-waving/64x48/it.png?raw=true)

[![](https://github.com/stefangabos/world_countries/raw/master/data/flags/flat-waving/64x48/us.png?raw=true)](https://github.com/stefangabos/world_countries/blob/master/data/flags/flat-waving/64x48/us.png?raw=true)

[![](https://github.com/stefangabos/world_countries/raw/master/data/flags/flat-waving/64x48/pt.png?raw=true)](https://github.com/stefangabos/world_countries/blob/master/data/flags/flat-waving/64x48/pt.png?raw=true)

[![](https://github.com/stefangabos/world_countries/raw/master/data/flags/flat-waving/64x48/es.png?raw=true)](https://github.com/stefangabos/world_countries/blob/master/data/flags/flat-waving/64x48/es.png?raw=true)

[![](https://github.com/stefangabos/world_countries/raw/master/data/flags/flat-waving/64x48/br.png?raw=true)](https://github.com/stefangabos/world_countries/blob/master/data/flags/flat-waving/64x48/br.png?raw=true)

[![](https://github.com/stefangabos/world_countries/raw/master/data/flags/flat-waving/64x48/dk.png?raw=true)](https://github.com/stefangabos/world_countries/blob/master/data/flags/flat-waving/64x48/dk.png?raw=true)

> Flag images are also available as single `JSON` files, one for each of the available sizes, containing all flag images as `data-uri`

🎂 Support the development of this project
-----------------------------------------

[](#-support-the-development-of-this-project)

Your support means a lot and it keeps me motivated to keep working on open source projects.
If you like this project please ⭐ it by clicking on the star button at the top of the page.
If you are feeling generous, you can buy me a coffee by donating through PayPal, or you can become a sponsor.
Either way - **Thank you!** 🎉

[![Star it on GitHub](https://camo.githubusercontent.com/0cf12308639194e5f324714d06bf16b6eb36e933f2f3b4db1b1114040c67898d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f73746566616e6761626f732f776f726c645f636f756e74726965733f636f6c6f723d677265656e266c6162656c3d7374617225323069742532306f6e253230476974487562)](https://github.com/stefangabos/world_countries) [![Donate](https://camo.githubusercontent.com/604e3db9c8751116b3f765aad0353ec7ded655bbe8aaacbc38d8c4a6b784b3ed/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f6e6174652d50617950616c2d677265656e2e737667)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=BPBPYP293BRLC) [![](https://camo.githubusercontent.com/7a6725dd6857bfabaca4b6783ac9ff3c2e882456681b5fdfb1fae916c0461c73/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d53706f6e736f722d6661666266633f6c6f676f3d47697448756225323053706f6e736f7273)](https://github.com/sponsors/stefangabos)

Installation
------------

[](#installation)

The lists are available as a [npm package](https://www.npmjs.com/package/world_countries_lists). To install it use:

```
# the "--save" argument adds the plugin as a dependency in packages.json
npm install world_countries_lists --save
```

You can install the lists via [Composer](https://packagist.org/packages/stefangabos/world_countries)

```
composer require stefangabos/world_countries
```

Alternatively, you can load data from [JSDelivr CDN](https://www.jsdelivr.com/package/npm/world_countries_lists) like this:

```

```

Or

> [download a customized build](http://stefangabos.github.io/world_countries/).

Data formats
------------

[](#data-formats)

### MySQL

[](#mysql)

Excerpt from the `data/countries/en/countries.sql` file:

(the columns are `id`,`alpha2`,`alpha3`,`name`)

```
(250,'fr','fra','France'),
(266,'ga','gab','Gabon'),
(270,'gm','gmb','Gambia'),
(268,'ge','geo','Georgia'),
(276,'de','deu','Germany'),
(288,'gh','gha','Ghana'),
(300,'gr','grc','Greece'),
(308,'gd','grd','Grenada'),
```

### MSSQL

[](#mssql)

Excerpt from the `data/countries/en/countries-mssql.sql` file:

(the columns are `id`,`alpha2`,`alpha3`,`name`)

```
(250,'fr','fra',N'France'),
(266,'ga','gab',N'Gabon'),
(270,'gm','gmb',N'Gambia'),
(268,'ge','geo',N'Georgia'),
(276,'de','deu',N'Germany'),
(288,'gh','gha',N'Ghana'),
(300,'gr','grc',N'Greece'),
(308,'gd','grd',N'Grenada'),
```

### CSV

[](#csv)

Excerpt from the `data/countries/en/countries.csv` file:

(the columns are `id`,`alpha2`,`alpha3`,`name`)

```
250,fr,fra,France
266,ga,gab,Gabon
270,gm,gmb,Gambia
268,ge,geo,Georgia
276,de,deu,Germany
288,gh,gha,Ghana
300,gr,grc,Greece
308,gd,grd,Grenada
```

### JSON

[](#json)

Excerpt from the `data/countries/en/countries.json` file:

```
{"id":250,"alpha2":"fr","alpha3":"fra","name":"France"},
{"id":266,"alpha2":"ga","alpha3":"gab","name":"Gabon"},
{"id":270,"alpha2":"gm","alpha3":"gmb","name":"Gambia"},
{"id":268,"alpha2":"ge","alpha3":"geo","name":"Georgia"},
{"id":276,"alpha2":"de","alpha3":"deu","name":"Germany"},
{"id":288,"alpha2":"gh","alpha3":"gha","name":"Ghana"},
{"id":300,"alpha2":"gr","alpha3":"grc","name":"Greece"},
{"id":308,"alpha2":"gd","alpha3":"grd","name":"Grenada"},
```

Here's a little helper function for searching for a specific country's data

> The helper function assumes that the JSON with the countries data is associated with a variable named `countries` which is in the same scope as the function

> The helper function is to be used with the *non-combined* data sets.
> For the *combined* data sets you can write the function yourself.

```
//  returns an object with the sought country's data if the search yields a result
//  returns undefined if no results could be found or if argument is incorrect
function search_country(query) {

    // if argument is not valid return false
    if (undefined === query.id && undefined === query.alpha2 && undefined === query.alpha3) return undefined;

        // iterate over the array of countries
	return countries.filter(function(country) {

        // return country's data if
        return (
            // we are searching by ID and we have a match
            (undefined !== query.id && parseInt(country.id, 10) === parseInt(query.id, 10))
            // or we are searching by alpha2 and we have a match
            || (undefined !== query.alpha2 && country.alpha2 === query.alpha2.toLowerCase())
            // or we are searching by alpha3 and we have a match
            || (undefined !== query.alpha3 && country.alpha3 === query.alpha3.toLowerCase())
        )

    // since "filter" returns an array we use pop to get just the data object
    }).pop()

}
```

Usage

```
search_country({id: 250})
search_country({alpha2: 'fr'})
search_country({alpha3: 'fra'})
```

### TypeScript

[](#typescript)

Typings are available ([source](types.d.ts)):

```
import { Country, LanguageCode, TranslatedCountry } from 'world_countries_lists'
```

### PHP

[](#php)

Excerpt from the `data/countries/en/countries.php` file:

```
250 => array('id' => 250, 'alpha2' => 'fr', 'alpha3' => 'fra', 'name' => 'France'),
266 => array('id' => 266, 'alpha2' => 'ga', 'alpha3' => 'gab', 'name' => 'Gabon'),
270 => array('id' => 270, 'alpha2' => 'gm', 'alpha3' => 'gmb', 'name' => 'Gambia'),
```

Here's a little helper function for searching for a specific country's data

> The helper function is to be used with the *non-combined* data sets.
> For the *combined* data sets you can write the function yourself.

```
//  this function assumes that you have done this:
$countries = require 'path/to/countries.php';

//  returns an array with the sought country's data if the search yields a result
//  returns false if no results could be found or if argument is incorrect
function search_country($query) {

    // make the countries available in the function
    global $countries;

    // if argument is not valid return false
    if (!isset($query['id']) && !isset($query['alpha2']) && !isset($query['alpha3'])) return false;

    // iterate over the array of countries
    $result = array_filter($countries, function($country) use ($query) {

        // return country's data if
        return (
            // we are searching by ID and we have a match
            (isset($query['id']) && $country['id'] == $query['id'])
            // or we are searching by alpha2 and we have a match
            || (isset($query['alpha2']) && $country['alpha2'] == strtolower($query['alpha2']))
            // or we are searching by alpha3 and we have a match
            || (isset($query['alpha3']) && $country['alpha3'] == strtolower($query['alpha3']))
        );

    });

    // since "array_filter" returns an array we use pop to get just the data object
    // we return false if a result was not found
    return empty($result) ? false : array_pop($result);

}
```

Usage

```
search_country(array('id' => 250));
search_country(array('alpha2' => 'fr'));
search_country(array('alpha3' => 'fra'));
```

### XML

[](#xml)

Excerpt from the `data/countries/en/countries.xml` file:

```

```

###  Health Score

58

—

FairBetter than 98% of packages

Maintenance67

Regular maintenance activity

Popularity60

Solid adoption and visibility

Community31

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 98.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~108 days

Recently: every ~40 days

Total

18

Last Release

194d ago

Major Versions

2.10.0 → v3.0.02025-05-30

### Community

Maintainers

![](https://www.gravatar.com/avatar/c1089e48cafe9a5737b8512d9fddff8596b9ef102276f25b6361bc6781d108aa?d=identicon)[stefangabos](/maintainers/stefangabos)

---

Top Contributors

[![stefangabos](https://avatars.githubusercontent.com/u/741165?v=4)](https://github.com/stefangabos "stefangabos (423 commits)")[![edy-dev](https://avatars.githubusercontent.com/u/10093173?v=4)](https://github.com/edy-dev "edy-dev (2 commits)")[![bfischer1121](https://avatars.githubusercontent.com/u/497056?v=4)](https://github.com/bfischer1121 "bfischer1121 (1 commits)")[![respencer](https://avatars.githubusercontent.com/u/201834?v=4)](https://github.com/respencer "respencer (1 commits)")[![spyridonas](https://avatars.githubusercontent.com/u/4473825?v=4)](https://github.com/spyridonas "spyridonas (1 commits)")[![RD-PINGEDPNG](https://avatars.githubusercontent.com/u/128886701?v=4)](https://github.com/RD-PINGEDPNG "RD-PINGEDPNG (1 commits)")[![Parikshit-Hooda](https://avatars.githubusercontent.com/u/25405707?v=4)](https://github.com/Parikshit-Hooda "Parikshit-Hooda (1 commits)")

---

Tags

countriescsvflagsiso-3166-1jsonmultilingualmysqlnational-flagssqlxmlcountriesISO 3166flagsflagworldISO 3166-1alpha-2alpha-3

### Embed Badge

![Health badge](/badges/stefangabos-world-countries/health.svg)

```
[![Health](https://phpackages.com/badges/stefangabos-world-countries/health.svg)](https://phpackages.com/packages/stefangabos-world-countries)
```

###  Alternatives

[annexare/countries-list

Continents &amp; countries: ISO 3166-1 alpha-2 code, name, ISO 639-1 languages, capital, currency, native name, phone. JSON, CSV and SQL.

1.3k220.8k1](/packages/annexare-countries-list)[khsing/world

Provide countries, states, and cities relations database.

461146.3k1](/packages/khsing-world)[aternus/geonames-client

GeoNames API Client

39215.5k2](/packages/aternus-geonames-client)[io238/laravel-iso-countries

Ready-to-use Laravel models and relations for country (ISO 3166), language (ISO 639-1), and currency (ISO 4217) information with multi-language support.

5462.3k](/packages/io238-laravel-iso-countries)[sameer-shelavale/php-countries-array

PHP class to get array of countries names with ISO\_3166-1 alpha-2, alpha-3, numeric codes, ISD codes and continent

34408.8k1](/packages/sameer-shelavale-php-countries-array)[lwwcas/laravel-countries

A comprehensive package for managing country data in Laravel applications, including multilingual support, geographic coordinates, and detailed metadata for seamless integration with Laravel.

12464.0k](/packages/lwwcas-laravel-countries)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
