Mapped: Safest Cities in Africa in 2025

Africa’s cities are as diverse as the continent itself — and while safety levels vary widely, there are numerous urban destinations where travelers can explore with confidence. Using the Numbeo Safety Index (mid-2025), we’ve ranked all 17 African cities with sufficient data, from the safest to the most challenging.

Rabat, Morocco leads the continent with a Safety Index of 64.6 — the only African city scoring above 60 and comparable to cities like Dusseldorf (64.5) and Moscow (64.7) globally. North African cities generally score highest, while South African cities face the most significant safety challenges.

Interactive Map: Safest Cities in Africa

Explore the map below to compare safety levels across African cities. Green markers indicate safer cities, yellow marks moderate safety, and red indicates higher risk areas.

Key Findings

  • Rabat, Morocco is Africa’s safest city with a Safety Index of 64.6 — significantly ahead of #2
  • North Africa dominates the top 7: Rabat, Alexandria, Tunis, Cairo, Algiers, and Casablanca all rank highly
  • Only 6 of 17 African cities score above 50 on the Safety Index — showing the continent’s safety challenges
  • South African cities occupy the bottom 6 positions, with Pietermaritzburg scoring the lowest (17.3)
  • The gap between safest and least safe is enormous: Rabat (64.6) vs. Pietermaritzburg (17.3)
  • For country-level data, see the 20 safest countries in Africa based on the Global Peace Index

Complete Rankings: All African Cities (Numbeo Mid-2025)

1. Rabat, Morocco — Safety Index: 64.6

Morocco’s capital is Africa’s safest city by a comfortable margin. Rabat combines the charm of its UNESCO-listed medina and the Kasbah of the Udayas with modern government infrastructure and well-maintained public spaces. As the political center of the kingdom, Rabat benefits from enhanced security while maintaining a relaxed, walkable atmosphere that visitors consistently praise.

2. Alexandria, Egypt — Safety Index: 55.3

Egypt’s second-largest city and Mediterranean jewel, Alexandria ranks 2nd in Africa for safety. Founded by Alexander the Great in 331 BC, this historic port city offers a more relaxed pace than Cairo. Its famous Corniche waterfront, the modern Bibliotheca Alexandrina, and vibrant café culture make it a favorite among visitors seeking Egyptian culture with enhanced safety.

3. Tunis, Tunisia — Safety Index: 51.3

The capital of Tunisia earns the #3 spot with a Safety Index above 50. Tunis blends French colonial architecture with a historic Arab medina, and the ancient ruins of Carthage sit on its doorstep. Tunisia has invested significantly in tourism security following challenges in the mid-2010s, and the results are showing in its improved safety metrics.

4. Addis Ababa, Ethiopia — Safety Index: 50.3

As the headquarters of the African Union and a major diplomatic hub, Addis Ababa benefits from heightened security infrastructure. The Ethiopian capital sits at 2,355 meters above sea level and is known for its excellent coffee culture, the National Museum (home of “Lucy”), and a growing food scene. Its score of 50.3 represents improvement from previous years.

5. Cairo, Egypt — Safety Index: 49.5

Africa’s largest city (population 22 million) scores just below the 50 mark. Cairo is one of the world’s oldest cities and home to the Pyramids of Giza — the last surviving wonder of the ancient world. While its sheer size creates predictable urban challenges, tourist areas and central districts are well-policed and generally safe for visitors.

6. Algiers, Algeria — Safety Index: 49.0

Algeria’s capital rounds out the cities scoring near or above 50. Built on the hills overlooking the Mediterranean, Algiers features a stunning UNESCO-listed Casbah, Ottoman-era architecture, and French colonial boulevards. The city is less touristy than its North African neighbors, which some visitors see as an advantage for authentic experiences.

7. Casablanca, Morocco — Safety Index: 44.8

Morocco’s largest city and economic capital, Casablanca is home to the stunning Hassan II Mosque — one of the largest in the world. While scoring lower than Rabat, Casablanca’s safety metrics are reasonable for a city of its size (4 million). Tourist areas and the modern city center are generally safe, though standard big-city precautions apply.

8. Nairobi, Kenya — Safety Index: 40.4

Nairobi is East Africa’s largest city and economic hub. It’s unique in hosting a national park within city limits — Nairobi National Park, where lions and giraffes roam against a skyline backdrop. While Nairobi has a reputation for crime, significant improvements in policing and security technology have improved safety in tourist areas, the CBD, and upscale neighborhoods.

9. Harare, Zimbabwe — Safety Index: 38.2

Zimbabwe’s capital is known for its tree-lined avenues and pleasant climate. While economic challenges have affected security, Harare’s central areas and northern suburbs remain relatively safe. The city serves as a base for trips to Victoria Falls, the Eastern Highlands, and Great Zimbabwe ruins.

10. Windhoek, Namibia — Safety Index: 33.0

Namibia’s capital sits at 1,700 meters in a valley surrounded by hills. Despite scoring lower on the Numbeo index, Windhoek is generally considered safe by African standards, and Namibia overall ranks as the continent’s 3rd safest country on the GPI. The city’s compact size and lower population density contribute to its manageable safety environment.

11–17: Lagos to Pietermaritzburg

Lagos, Nigeria (31.6) — Africa’s megacity of 15+ million; vibrant but challenging. Cape Town, South Africa (26.4) — Stunning scenery but significant safety disparities between neighborhoods. Port Elizabeth, South Africa (21.7) — Known as the “Friendly City” but with elevated crime rates. Durban, South Africa (19.6) — Beach city with concerning safety metrics. Johannesburg, South Africa (19.2) — Economic powerhouse with well-known security challenges. Pretoria, South Africa (18.2) — Administrative capital with similar concerns. Pietermaritzburg, South Africa (17.3) — KwaZulu-Natal city with the lowest safety score on the continent.

Complete Rankings Table

RankCityCountrySafety IndexCrime Index
1Rabat🇲🇦 Morocco64.635.4
2Alexandria🇪🇬 Egypt55.344.7
3Tunis🇹🇳 Tunisia51.348.7
4Addis Ababa🇪🇹 Ethiopia50.349.7
5Cairo🇪🇬 Egypt49.550.5
6Algiers🇩🇿 Algeria49.051.0
7Casablanca🇲🇦 Morocco44.855.2
8Nairobi🇰🇪 Kenya40.459.6
9Harare🇿🇼 Zimbabwe38.261.8
10Windhoek🇳🇦 Namibia33.067.0
11Lagos🇳🇬 Nigeria31.668.4
12Cape Town🇿🇦 South Africa26.473.6
13Port Elizabeth🇿🇦 South Africa21.778.3
14Durban🇿🇦 South Africa19.680.4
15Johannesburg🇿🇦 South Africa19.280.8
16Pretoria🇿🇦 South Africa18.281.8
17Pietermaritzburg🇿🇦 South Africa17.382.7

Methodology

Rankings are based on the Numbeo Crime Index for Africa (mid-2025). The Safety Index is calculated as 100 minus the Crime Index. Data is crowdsourced from resident and visitor surveys, covering perceived crime levels, safety walking alone (day and night), and concerns about various types of crime. Only cities with sufficient survey responses are included — many African cities lack enough data to be ranked.

Note: Numbeo’s rankings reflect perceived safety based on surveys, which can differ from official crime statistics. Cities not listed (like Kigali, Dar es Salaam, or Accra) simply don’t have enough survey responses on Numbeo to generate reliable scores.