Introduction
The Countries States Cities Database is the world’s most comprehensive open-source geographical database, providing structured data for countries, states/provinces, and cities worldwide. With regular updates and multiple export formats, it serves as the foundation for countless applications requiring geographical data.Live Database Demo
Explore the complete database online with search and filtering capabilities.
Download Database
Access the latest database files in all supported formats from GitHub.
Database Statistics
Our database contains comprehensive geographical data covering the entire world:6
Regions
22
Subregions
250
Countries
5,038
States
151,024
Cities
Last Updated: 21st September 2025
Available Formats
The database is available in multiple formats to suit different technical requirements and use cases:Database Formats
- MySQL (.sql) - Popular open-source relational database
- PostgreSQL (.sql) - Advanced open-source relational database
- SQLite (.sqlite3) - Lightweight file-based database
- SQL Server (.sql) - Microsoft SQL Server compatible format
File Distribution Matrix
Different data combinations are available depending on your needs:File Type | JSON | MySQL | PostgreSQL | SQLite | SQL Server | MongoDB | XML | YAML | CSV |
---|---|---|---|---|---|---|---|---|---|
Regions | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Subregions | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Countries | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
States | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Cities | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Country+States | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
Country+Cities | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
Complete World | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ |
Hierarchical combinations (Country+States, Country+Cities) are primarily available in JSON format for optimal nested data representation.
Key Features
Comprehensive Coverage
- Complete geographical hierarchy from regions down to cities
- Standardized naming using official sources and international standards
- ISO codes for countries (ISO 3166-1) and states where available
- Coordinate data with latitude and longitude for cities
- Timezone information for accurate time-based applications
Data Quality
- Regular updates with community contributions and automated monitoring
- Multiple validation layers ensuring data consistency and accuracy
- Source attribution for transparency and verification
- Version control with detailed changelog tracking
Developer-Friendly
- Multiple export formats supporting different technology stacks
- Consistent schema across all formats
- Well-documented structure with clear relationships
- API integration for real-time access alongside offline database usage
Common Use Cases
E-commerce Platforms
Address forms, shipping calculations, tax regions, and location-based services.
Analytics & BI
Geographic data analysis, regional reporting, and location-based insights.
Mobile Applications
Location selection, offline maps, regional content delivery.
Government & Public Sector
Census data integration, administrative boundaries, public service delivery.
Quick Start Options
Choose the approach that best fits your project:1
Direct Database Download
Download pre-built database files from GitHub in your preferred format.
Perfect for offline applications or when you need complete control over the data.
2
API Integration
Use our REST API for real-time data access without managing database files.
Ideal for applications that need always up-to-date data and don’t want to handle updates.
3
Custom Export
Use our Export Tool to create customized datasets with specific filters and formats.
Great for specific regional focus or when you only need subset of the data.
Next Steps
Schema Documentation
Understand the database structure, tables, and relationships.
Installation Guide
Step-by-step instructions for setting up the database in different environments.
Data Sources
Learn about our data sources and quality assurance process.
While we strive for accuracy, geographical data can change due to political developments, administrative reorganization, or other factors. Always verify critical data against official sources when needed.