Nager.Country 4.8.2

Prefix Reserved
dotnet add package Nager.Country --version 4.8.2
                    
NuGet\Install-Package Nager.Country -Version 4.8.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Nager.Country" Version="4.8.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Nager.Country" Version="4.8.2" />
                    
Directory.Packages.props
<PackageReference Include="Nager.Country" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Nager.Country --version 4.8.2
                    
#r "nuget: Nager.Country, 4.8.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Nager.Country@4.8.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Nager.Country&version=4.8.2
                    
Install as a Cake Addin
#tool nuget:?package=Nager.Country&version=4.8.2
                    
Install as a Cake Tool

Nager.Country

Country data for .NET as strongly typed objects. ISO 3166-1 codes, names, region, borders, currencies (ISO 4217), top-level domains and calling codes for 250 countries and territories. No database, no web requests, no configuration: all data is compiled into the assembly.

Supports .NET 10, .NET 9, .NET Standard 2.0 / 2.1 and .NET Framework 4.8.

What's included

Property Example (Germany)
CommonName Germany
OfficialName Federal Republic of Germany
NativeName Deutschland
Slug germany
Alpha2Code / Alpha3Code / NumericCode DE / DEU / 276
Region / SubRegion Europe / WesternEurope
BorderCountries AT, BE, CZ, DK, FR, LU, NL, PL, CH
Currencies EUR (symbol, name, ISO numeric code, decimal digits)
TLD .de
CallingCodes 49

Usage

using Nager.Country;

ICountryProvider countryProvider = new CountryProvider();

// Lookup by ISO 3166-1 alpha-2 or alpha-3 code (string, case-insensitive)
var germany = countryProvider.GetCountry("de");

// Lookup by strongly typed code
var austria = countryProvider.GetCountry(Alpha2Code.AT);
var france = countryProvider.GetCountry(Alpha3Code.FRA);

// Lookup by name (common, official or native name)
var swiss = countryProvider.GetCountryByName("Schweiz");

// Lookup without exception
if (countryProvider.TryGetCountry("xx", out var countryInfo))
{
    // ...
}

// All 250 countries and territories
var countries = countryProvider.GetCountries();

GetCountry and GetCountryByName throw an UnknownCountryException if no country matches. Use the TryGet... methods to avoid exceptions. On .NET Standard 2.1 and newer, TryGetCountryByName and TryGetCountryBySlug are available as well.

Currencies

All ISO 4217 currencies are available through CurrencyProvider, independent of a country:

var euro = CurrencyProvider.Eur;
// euro.IsoCode       -> EUR
// euro.NumericCode   -> 978
// euro.Symbol        -> €
// euro.DecimalDigits -> 2

Translations

Need country names in other languages, e.g. Allemagne, Alemania or ドイツ? Install Nager.Country.Translation. It adds the names of all countries in 49 languages and lookup by translated name.

JSON export

The same dataset is also available as JSON files: countries.zip from the latest release.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 is compatible.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.8

    • No dependencies.
  • .NETStandard 2.0

    • No dependencies.
  • .NETStandard 2.1

    • No dependencies.
  • net10.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages (7)

Showing the top 5 NuGet packages that depend on Nager.Country:

Package Downloads
VirtoCommerce.Platform.Data

Virto Commerce is a source-available .NET digital commerce platform for organizations running complex sales, procurement, and distribution operations online. https://virtocommerce.com

Nager.Country.Translation

Translations for Nager.Country: names of 250 countries and territories in 49 languages, names of 184 ISO 639-1 languages, lookup of a country by its localized name and translation via CultureInfo with fallback language. Compiled into the assembly, no web requests.

VirtoCommerce.CustomerExportImportModule.Core

Package Description

UNLowCoder.Extensions

Extension methods for the UNECE UN/Locodes

SamCommerce.Platform.Data

Package Description

GitHub repositories (4)

Showing the top 4 popular GitHub repositories that depend on Nager.Country:

Repository Stars
vpnhood/VpnHood
An open-source VPN, from the engine to the apps and the server, written in C# on .NET. It resists deep packet inspection: it looks like ordinary browsing, for more privacy.
VirtoCommerce/vc-platform
Virto's Commerce Innovation Platform. Source-available, modular .NET commerce backend built on Virto Atomic Architecture™.
TabBlazor/TabBlazor
Blazor admin template based on Tabler UI
ComPDFKit/compdfkit-pdf-sdk-windows
High-performance PDF library for Windows desktop apps. Integrate PDF viewing, editing, annotations, form filling, digital signatures, redaction, and document conversion into your .NET and C# applications with ease.
Version Downloads Last Updated
4.8.2 12 12/3/2026
4.8.1 23 12/3/2026
4.8.0 165,749 9/15/2026
4.7.1 411,955 6/8/2026
4.7.0 3,076 6/8/2026
4.6.1 140,304 5/4/2026
4.6.0 1,136 5/4/2026
4.5.0 29,071 4/21/2026
4.4.0 293,333 2/11/2026
4.3.5 272,517 1/10/2026
4.3.4 374,497 10/13/2025
4.3.3 258,138 9/4/2025
4.3.2 1,334 9/4/2025
4.3.1 1,441 9/4/2025
4.3.0 22,053 8/28/2025
4.2.0 110,679 7/7/2025
4.1.0 181,618 6/4/2025
4.0.1 51,461 5/21/2025
4.0.0 3,504,171 4/11/2023
3.1.1 1,880,137 9/30/2021
Loading failed