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.
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.
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.
Choose Your Format
Download the complete database in your preferred format. All formats contain the same comprehensive data.
JSON
12MB compressed
Lightweight, web-friendly format
MySQL
8MB compressed
Ready-to-import SQL database
PostgreSQL
8MB compressed
Advanced database format
MongoDB
15MB compressed
NoSQL document database
SQLite
7MB compressed
Serverless database file
SQL Server
7MB compressed
Enterprise-grade database
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
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.).
Join Our Growing Community
Thousands of developers worldwide contribute to and benefit from this open-source project