DEV.co
Open-Source Databases · stefangabos

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.

Source: GitHub — github.com/stefangabos/world_countries
1.6k
GitHub stars
391
Forks
PHP
Primary language
CC-BY-SA-4.0
License (Requires review (not clearly OSI))

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositorystefangabos/world_countries
Ownerstefangabos
Primary languagePHP
LicenseCC-BY-SA-4.0 — Requires review (not clearly OSI)
Stars1.6k
Forks391
Open issues8
Latest release3.3.0 (2025-11-05)
Last updated2026-04-04
Sourcehttps://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.

Quickstart

Get the world_countries source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/stefangabos/world_countries.gitcd world_countries# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Multi-language country selection UI

Populate dropdown lists, autocomplete fields, or regional filters across 37 languages without maintaining separate translation pipelines.

Geolocation and regional compliance databases

Seed country codes, alpha-2/alpha-3 identifiers, and subdivision hierarchies for tax, shipping, or regulatory region mapping.

Flag asset delivery

Embed or serve national flags across multiple DPI/resolution variants (16x16 to 128x128) without external icon CDN overhead.

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.

SignalAssessment
MaintenanceActive
DocumentationAdequate
License clarityNeeds review
Deployment complexityLow
DEV.co fitGood
Assessment confidenceHigh
Security considerations

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.

Software development agency

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.co

Related 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?
CC-BY-SA-4.0 permits commercial use, but any derivative data (modified country/subdivision lists) must be published under the same license. Flag imagery licensing (icondrawer.com, lipis/flag-icons) requires separate review. Consult legal before deployment.
How often is the data updated?
Unknown. Latest release was 2025-11-05; update frequency and trigger criteria are not documented. Monitor GitHub releases or subscribe to notifications for upstream changes.
Is subdivision data hierarchically complete?
Subdivision data includes country, ISO 3166-2 code, name, type, and parent reference but is not a full traversable tree. Custom schema mapping required for complex region hierarchies.
What formats are available?
CSV, JSON, PHP, MySQL, MSSQL, XML. Language-specific variants exist in 37 languages. npm package (world_countries_lists) provides prebuilt JS/JSON; all formats are available in the GitHub repository.

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.