Nager.Country provides a comprehensive dataset of worldwide country information, designed for developers who need reliable and structured country-related data.
The dataset includes 250 countries and territories with detailed information such as:
- ✅ Official country names
- 🌐 ISO 3166 Alpha-2, Alpha-3, and numeric country codes
- 💱 Associated currencies and ISO 4217 currency codes
- 🌍 Continent and subregion classification
- 🌐 Country borders
- 🌏 Translations in multiple languages
- 🗣️ Official and spoken languages (ISO 639) (not yet available)
You can access the data in two ways:
- Via NuGet package – ideal for .NET applications
- As a downloadable ZIP archive containing structured JSON files (latest zip package)
Perfect for projects that require up-to-date and standardized country data, such as:
- International e-commerce systems
- Travel and booking platforms
- Localization (i18n) features
- Data validation and enrichment
- Geographic analytics and reporting
The project is available as NuGet packages for easy integration into any .NET application.
PM> install-package Nager.Country
Provides localized country names (translations based on the commonName in multiple languages).
PM> install-package Nager.Country.Translation
Retrieve a full list of all 250 countries and territories.
var countryProvider = new CountryProvider();
var countries = countryProvider.GetCountries();Get detailed information by specifying the official English country name.
var countryProvider = new CountryProvider();
var countryInfo = countryProvider.GetCountryByName("Germany");
//countryInfo.Alpha2Code -> DE
//countryInfo.Alpha3Code -> DEU
//countryInfo.NumericCode -> 276
//countryInfo.Region -> Europe
//countryInfo.SubRegion -> WesternEurope
//countryInfo...Enables country name lookup using translations (e.g. "Germania" instead of "Germany").
➡️ Requires the translation package Nager.Country.Translation
var countryProvider = new CountryProvider();
var countryInfo = countryProvider.GetCountryByNameConsiderTranslation("Germania"); // <- Germany
//countryInfo.Alpha2Code -> DE
//countryInfo.Alpha3Code -> DEU
//countryInfo.NumericCode -> 276
//countryInfo.Region -> Europe
//countryInfo.SubRegion -> WesternEurope
//countryInfo...Translate the official country name into a desired language.
➡️ Requires the translation package Nager.Country.Translation
var translationProvider = new TranslationProvider();
var translatedCountryName = translationProvider.GetCountryTranslatedName(Alpha2Code.DE, LanguageCode.EN);
//translatedCountryName -> GermanyList all language codes available for translation purposes. ➡️ Requires the translation package Nager.Country.Translation
var translationProvider = new TranslationProvider();
var languages = translationProvider.GetLanguages();Here are some useful projects that also provide country-related data, validation, or localization features:
| Language | Project |
|---|---|
| * | mledoze countries |
| * | umpirsky country-list |
| * | dr5hn countries-states-cities-database |
| javascript | michaelwittig node-i18n-iso-countries |
| .net | anghelvalentin CountryValidator |