Habitat fragmentation due to dams is a well‐known threat to freshwater fish. Yet, the global consequences of fragmentation for the viability of freshwater fish populations are unknown. Here, we provide the first global assessment of the threats of dams to the persistence of freshwater fish species. We developed a global macroecological relationship between freshwater fish range size and body size and used this relationship to assess whether isolated range fragments are too small to support a species. Our assessment includes 7369 freshwater fish species and considers the effects of 31,780 dams globally. Furthermore, we performed a more detailed analysis of the threats of dams in Brazil, the greater Mekong region and the United States, using complementary national and regional data sets. Globally, more than half of the species analysed face extirpation in a part of their geographic range, with an average potential range loss of 3.3% (95%‐range: 0%–31.8%) across all species analysed. For 74 fish species, occurring in Brazil, China, India, the Mekong basin, the United States, South‐Africa and the East Adriatic Coast, more than 50% of their range is potentially lost. This includes 18 species threatened with extinction across their whole range. Our complementary regional analysis revealed that the potentially lost range increases by a factor of 2–4 when considering both large and small dams compared with considering only large dams (≥15 m), highlighting the need to establish more comprehensive global dam inventories. Our novel approach and global analysis identifies species at risk of extirpation as well as geographic hotspots of extirpation threat by dams, which can aid in establishing more effective strategies for global hydropower development and barrier removal efforts to optimise the trade‐offs between biodiversity conservation and the socio‐economic benefits of dams.