Helping the world's coastal communities adapt to climate change impacts requires evaluating the vulnerability of coastal communities and assessing adaptation options. This includes understanding the potential for 'natural' infrastructure (ecosystems and the biodiversity that underpins them) to reduce communities' vulnerability, alongside more traditional 'hard' infrastructure approaches. Here we present a spatially explicit global evaluation of the vulnerability of coastal-dwelling human populations to key climate change exposures and explore the potential for coastal ecosystems to help people adapt to climate change (ecosystem-based adaptation (EbA)). We find that mangroves and coral reefs are particularly well situated to help people cope with current weather extremes, a function that will only increase in importance as people adapt to climate change now and in coming decades. We find that around 30.9 million people living within 2km of the coast are highly vulnerable to tropical storms and sea-level rise (SLR). Mangroves and coral reefs overlap these threats to at least 5.3 and 3.4 million people, respectively, with substantial potential to dissipate storm surges and improve resilience against SLR effects. Significant co-benefits from mangroves also accrue, with 896 million metric tons of carbon stored in their soils and above- and below-ground biomass. Our framework offers a tool for prioritizing 'hotspots' of coastal EbA potential for further, national and local analyses to quantify risk reduction and, thereby, guide investment in coastal ecosystems to help people adapt to climate change. In doing so, it underscores the global role that conserving and restoring ecosystems can play in protecting human lives and livelihoods, as well as biodiversity, in the face of climate change.