Skip to Content

African Countries: Complete List with ISO 3166 Codes

Africa is the second-largest continent by both area and population, with 54 sovereign nations and several dependent territories. This reference lists every African country and territory recognized in ISO 3166, organized by UN M49 subregion, with their alpha-2, alpha-3, and numeric codes.

Quick Access with Code

Get all African countries programmatically using @koshmoney/countries:

import { geography } from '@koshmoney/countries/geography'; import { country } from '@koshmoney/countries'; // Get all African country codes const africanCodes = geography.getCountriesByContinent('Africa'); // ['AO', 'BF', 'BI', 'BJ', 'BW', 'CD', 'CF', 'CG', 'CI', 'CM', ...] // Get full country objects const africanCountries = africanCodes.map((code) => country.whereAlpha2(code)); console.log(africanCountries.length); // 58 (including territories)

Northern Africa

CountryAlpha-2Alpha-3Numeric
AlgeriaDZDZA012
EgyptEGEGY818
LibyaLYLBY434
MoroccoMAMAR504
SudanSDSDN729
TunisiaTNTUN788
Western SaharaEHESH732
import { geography } from '@koshmoney/countries/geography'; geography.getCountriesByRegion('Northern Africa'); // ['DZ', 'EG', 'EH', 'LY', 'MA', 'SD', 'TN']

Eastern Africa

CountryAlpha-2Alpha-3Numeric
BurundiBIBDI108
ComorosKMCOM174
DjiboutiDJDJI262
EritreaERERI232
EthiopiaETETH231
KenyaKEKEN404
MadagascarMGMDG450
MalawiMWMWI454
MauritiusMUMUS480
MayotteYTMYT175
MozambiqueMZMOZ508
ReunionREREU638
RwandaRWRWA646
SeychellesSCSYC690
SomaliaSOSOM706
South SudanSSSSD728
TanzaniaTZTZA834
UgandaUGUGA800
ZambiaZMZMB894
ZimbabweZWZWE716

Eastern Africa is the largest subregion on the continent with 20 entries, including the island nations of Comoros, Madagascar, Mauritius, and Seychelles, as well as the French overseas territories of Mayotte and Reunion.

Middle Africa

CountryAlpha-2Alpha-3Numeric
AngolaAOAGO024
CameroonCMCMR120
Central African RepublicCFCAF140
ChadTDTCD148
CongoCGCOG178
Congo, Democratic RepublicCDCOD180
Equatorial GuineaGQGNQ226
GabonGAGAB266
Sao Tome and PrincipeSTSTP678

[!NOTE] The two Congo entries are distinct countries. The Republic of the Congo (CG/COG) and the Democratic Republic of the Congo (CD/COD) have different ISO codes. Be careful not to confuse them in your applications.

Southern Africa

CountryAlpha-2Alpha-3Numeric
BotswanaBWBWA072
Eswatini (Swaziland)SZSWZ748
LesothoLSLSO426
NamibiaNANAM516
South AfricaZAZAF710

Southern Africa is the smallest subregion with just 5 countries. South Africa (ZA) is the economic powerhouse of the region and the entire continent.

Western Africa

CountryAlpha-2Alpha-3Numeric
BeninBJBEN204
Burkina FasoBFBFA854
Cape VerdeCVCPV132
GambiaGMGMB270
GhanaGHGHA288
GuineaGNGIN324
Guinea-BissauGWGNB624
Ivory CoastCICIV384
LiberiaLRLBR430
MaliMLMLI466
MauritaniaMRMRT478
NigerNENER562
NigeriaNGNGA566
Saint HelenaSHSHN654
SenegalSNSEN686
Sierra LeoneSLSLE694
TogoTGTGO768

Nigeria (NG) is the most populous country in Africa and the seventh most populous in the world.

Working with African Country Data

Filter African countries by currency

import { geography } from '@koshmoney/countries/geography'; import { currency } from '@koshmoney/countries/currency'; const africanCodes = geography.getCountriesByContinent('Africa'); // Find all African countries using a specific currency const xofCountries = africanCodes.filter((code) => { const curr = currency.getCurrency(code); return curr?.code === 'XOF'; }); // West African CFA franc countries

Validate an African country code

import { country } from '@koshmoney/countries'; import { geography } from '@koshmoney/countries/geography'; function isAfricanCountry(code: string): boolean { if (!country.isAlpha2(code)) return false; return geography.getContinent(code) === 'Africa'; } isAfricanCountry('NG'); // true (Nigeria) isAfricanCountry('US'); // false isAfricanCountry('XX'); // false

Get subdivisions for an African country

import { subdivision } from '@koshmoney/countries'; const nigerianStates = subdivision.forCountry('NG'); // [{ code: 'NG-AB', name: 'Abia', type: 'State', ... }, ...] console.log(nigerianStates.length); // 36 states + FCT

Summary

Africa has 58 entries in the ISO 3166 standard across 5 UN M49 subregions. The @koshmoney/countries library provides full access to all African country codes, subdivisions, currencies, and geographic classifications through a consistent, type-safe API.