EvvyTools.com EvvyTools.com
Home About Home & Real Estate Health & Fitness Freelance & Business Everyday Life Math Writing & Content Dev & Tech Data Lists Subscribe Contact
Sign In Create Account

UN Country Codes — ISO 3166 Complete Reference List

UN M.49 numeric codes with ISO alpha-2 and alpha-3

250 rows 4 columns

A complete reference of UN-recognized countries and territories with their ISO 3166-1 alpha-2, alpha-3, and numeric codes. This dataset is essential for any system that needs standardized country identifiers — from international trade documents to multilingual application locales.

Pro tip: Use the numeric codes when you need a language-independent identifier that stays stable even when a country changes its name — numeric codes rarely change while alpha codes occasionally do.

Select which columns to include in your download.

· ·

About the UN Country Codes Dataset

This dataset provides the complete list of countries, territories, and special areas recognized by the United Nations, each with its corresponding ISO 3166-1 codes. The ISO 3166-1 standard defines three sets of codes: alpha-2 (two-letter), alpha-3 (three-letter), and numeric (three-digit) identifiers. These codes are maintained by the ISO 3166 Maintenance Agency and updated periodically as geopolitical changes occur. The dataset covers all 249 officially assigned code elements, including sovereign states, dependent territories, and areas of special sovereignty.

Common Use Cases

Standardized country codes are foundational to international systems. Here are the most frequent applications:

  • Internationalization (i18n): Alpha-2 codes are used in locale identifiers (e.g. en-US, fr-FR), domain name extensions (ccTLDs), and language/region selection interfaces throughout software applications.
  • Trade and customs: International shipping documents, customs declarations, and trade compliance systems require ISO country codes for origin, destination, and transit country identification.
  • Financial systems: SWIFT messages, IBAN bank account numbers, and anti-money laundering (AML) checks all reference ISO 3166-1 codes to identify the country associated with financial transactions.
  • Data standardization: When merging datasets from different sources, country codes provide a reliable join key regardless of language differences or name variations in the original data.

Column Reference

The dataset includes all three ISO code formats plus descriptive fields:

  • country_name — The short-form English name of the country or territory as used by the United Nations.
  • alpha2 — The two-letter ISO 3166-1 alpha-2 code (e.g. "US", "GB", "CN"). This is the most widely used format in software, URLs, and everyday references.
  • alpha3 — The three-letter ISO 3166-1 alpha-3 code (e.g. "USA", "GBR", "CHN"). Often used in international sports, vehicle registration, and airline ticketing systems.
  • numeric — The three-digit ISO 3166-1 numeric code (e.g. "840", "826", "156"). Useful when a script-independent code is needed, such as in systems that do not support Latin characters.

Understanding the Three Code Formats

Each of the three code formats serves a distinct purpose. The alpha-2 code is compact and human-readable, making it the default choice for web applications, API parameters, and user interfaces. The alpha-3 code offers better visual association with country names — for example, "DEU" is more recognizable as Germany than "DE" for non-technical users. The numeric code is entirely language-neutral and does not change when a country changes its name, making it the most stable identifier for long-term data archiving and systems that process data across multiple scripts and languages.

Integration Recommendations

For web applications, download the JSON format to create a client-side lookup object keyed by alpha-2 code. This enables instant country name resolution in forms, maps, and display components without a server round-trip. For database systems, import the SQL format as a reference table and create a foreign key relationship from your user or transaction tables to the alpha-2 column. The CSV format is suitable for one-time imports into spreadsheet tools or business intelligence platforms where you need to enrich existing data with standardized country identifiers. When building APIs that accept country parameters, validate input against the alpha-2 column to reject malformed or non-existent country codes at the application boundary.

Link copied to clipboard!

Unlock the Full Experience

Ads are just the start. Subscribers get a clean interface, saved calculation history, SQL downloads, and priority support.

Subscribe