world_countries
World Countries is a curated, multilingual dataset of 249 ISO 3166-1 country codes and names available in CSV, JSON, PHP, SQL, and XML formats. It includes 37 language translations, national flag images, and ISO 3166-2 subdivision codes for provinces and states.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | stefangabos/world_countries |
| Owner | stefangabos |
| Primary language | PHP |
| License | CC-BY-SA-4.0 — Requires review (not clearly OSI) |
| Stars | 1.6k |
| Forks | 391 |
| Open issues | 8 |
| Latest release | 3.3.0 (2025-11-05) |
| Last updated | 2026-04-04 |
| Source | https://github.com/stefangabos/world_countries |
What world_countries is
A static-data repository providing normalized country and subdivision metadata sourced from Wikipedia, distributed in six formats (CSV, JSON, PHP, MySQL, MSSQL, XML) with programmatic access via npm. Data is language-stratified by ISO 639-1 codes; flags are stored as PNG assets at multiple resolutions.
Get the world_countries source
Clone the repository and explore it locally.
git clone https://github.com/stefangabos/world_countries.gitcd world_countries# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- CC-BY-SA-4.0 is a copyleft license requiring derivative works to share the same license; any modified country/subdivision data must be re-published under CC-BY-SA-4.0.
- Data is denormalized across language folders; consume via npm package (world_countries_lists) or clone and pre-process CSV/JSON into a single keyed structure for efficient lookups.
- Flag images sourced from two external origins with different licenses and DPI; verify flag asset licensing separately if bundling into commercial applications.
- No built-in API; access is file-based (download/CDN) or npm import. Integrate as read-only reference data during build or initialization, not runtime queries.
- Subdivision hierarchy is flat (country, code, name, type, parent). Complex regional hierarchies or cascading dependencies require custom schema mapping.
When to avoid it — and what to weigh
- Real-time country status changes required — Dataset is static and refreshed on release cycles. Disputed sovereignty, border changes, and UN membership updates may lag actual geopolitical events.
- Requires programmatic data validation or legal compliance verification — This is a reference list, not an authoritative legal or compliance database. Critical tax, sanctions, or regulatory queries should reference official sources.
- Need for dynamic, versioned subdivision hierarchies — Subdivision data lacks timestamps, parent-chain traversal utilities, or change-tracking; administrative divisions are static snapshots.
- Proprietary or commercial flag imagery licensing uncertainty — Flag source attribution (icondrawer.com defunct; lipis/flag-icons external) and CC-BY-SA-4.0 copyleft terms may conflict with proprietary product licensing.
License & commercial use
Licensed under CC-BY-SA-4.0 (Creative Commons Attribution-ShareAlike 4.0 International). Data sourced from Wikipedia (also CC-BY-SA-licensed). Flag images sourced from icondrawer.com (defunct, license unclear) and lipis/flag-icons (external, separate license review required).
CC-BY-SA-4.0 permits commercial use but requires: (1) attribution to original sources, (2) licensing of derivative works under CC-BY-SA-4.0. If bundling into proprietary software, any modifications to country/subdivision data must remain publicly available under the same license. Flag imagery licensing (particularly icondrawer.com and lipis/flag-icons) requires separate verification; contact maintainer or original sources for commercial clarity. Requires review before commercial deployment.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Adequate |
| License clarity | Needs review |
| Deployment complexity | Low |
| DEV.co fit | Good |
| Assessment confidence | High |
No runtime code execution, network exposure, or authentication. Data integrity depends on repository clone/npm fetch over HTTPS. Validate downloaded files against checksums if required by compliance policy. CC-BY-SA-4.0 copyleft terms may trigger IP review in proprietary environments.
Alternatives to consider
REST Countries (restcountries.com)
Provides country data via RESTful API with real-time updates, no local storage required. Slightly different schema and maintained separately; useful if you prefer API-first integration over static files.
ISO 3166 Official (iso.org)
Authoritative source directly from International Organization for Standardization. Data is expensive, not freely redistributable, and requires active subscription for compliance-critical use.
Flagpedia / FlagCDN (external SVG/PNG services)
Dedicated flag asset CDNs reduce local storage. Suitable if you do not need offline access or want to avoid CC-BY-SA licensing constraints on imagery.
Build on world_countries with DEV.co software developers
World Countries provides 249 ISO-standard country records and subdivisions in 6 formats and 37 languages. Download, import via npm, or integrate directly. Review CC-BY-SA-4.0 licensing requirements before commercial use.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
world_countries FAQ
Can I use this in a closed-source commercial product?
How often is the data updated?
Is subdivision data hierarchically complete?
What formats are available?
Software developers & web developers for hire
Need help beyond evaluating world_countries? DEV.co is a software development agency offering software development services and web development for teams of every size. Our software developers and web developers build custom software, web applications, APIs, and open-source databases integrations — and maintain them long-term.
Need country data for your application?
World Countries provides 249 ISO-standard country records and subdivisions in 6 formats and 37 languages. Download, import via npm, or integrate directly. Review CC-BY-SA-4.0 licensing requirements before commercial use.