Open Source • Free Forever

The world's most
complete open-source geographical database

Comprehensive geographical data covering 250+ countries, 5,000+ states, and 151,000+ cities. Available in 9+ formats, trusted by thousands of developers worldwide.

Community DrivenMonthly updatesODbL-1.0 License
Formats & Stats
All the essentials at a glance
Open-source
JSON
SQL Server
CSV
XML
YAML
MongoDB
MySQL
Postgres SQL
SQLite
250+
Countries
5,000+
States
151,000+
Cities
9+
Formats
Why choose our database

The foundation for your product’s location data

Powers the entire CSC ecosystem — open source and free forever, with accuracy you can trust.

Completely Open Source

Licensed under ODbL — commercial use with proper attribution. No vendor lock‑in and full transparency.

9+ Ready-to-Use Formats

Pick the shape you need, from relational databases to documents and flat files.

JSONCSVPostgreSQLMySQLMongoDBSQLiteXMLYAMLSQL ServerDuckDB

Complete Global Coverage

250+ countries, 5,000+ states, and 151,000+ cities with coordinates, codes, and metadata.

Regular Monthly Updates

Automated and community‑verified updates ensure accuracy and freshness across the entire dataset.

Optimized File Sizes

Compressed, right‑sized downloads so you only pull what you need — no unnecessary overhead.

Community Driven

Built and maintained by a global community of developers with an open contribution model.

Download Formats

Choose Your Format

Download the complete database in your preferred format. All formats contain the same comprehensive data.

Popular

JSON

12MB compressed

Lightweight, web-friendly format

Popular

MySQL

8MB compressed

Ready-to-import SQL database

PostgreSQL

8MB compressed

Advanced database format

Popular

MongoDB

15MB compressed

NoSQL document database

SQLite

7MB compressed

Serverless database file

SQL Server

7MB compressed

Enterprise-grade database

Popular

CSV

6MB compressed

Spreadsheet compatible format

XML

25MB compressed

Structured markup format

YAML

18MB compressed

Human-readable config format

What's Included in Every Format

250+ Countries
Complete with ISO codes, capitals, currencies
5,000+ States
Provinces, regions, administrative divisions
151,000+ Cities
Towns, districts, with coordinates
Rich Metadata
Coordinates, timezones, translations
Setup

Easy Installation & Setup

Multiple ways to integrate the database into your project. Choose the method that works best for you.

# Clone the repository
git clone https://github.com/dr5hn/countries-states-cities-database.git
cd countries-states-cities-database

# Navigate to your preferred format
cd json  # or mysql, psql, mongodb, etc.

# Use the data files in your project
cp countries.json /path/to/your/project/

Tip: Replace json in paths with your preferred format (mysql, psql, mongodb, csv, sql, etc.).

Community

Join Our Growing Community

Thousands of developers worldwide contribute to and benefit from this open-source project