Access to safe drinking water and sanitation is crucial for protecting human health and achieving many Sustainable Development Goals. However, the provision of these services requires significant amounts of energy, which are poorly quantified at the global scale. In this study, we develop a spatially explicit model framework (5 arcmin resolution) for quantifying the energy consumption of water treatment technologies globally, focusing on desalination, wastewater treatment and conventional drinking water treatment (i.e. from ground and suface water sources). We estimate that these processes required 379-1,159 TWh (1.36-4.17 EJ) globally in 2015, corresponding to 1.8-5.4% of total global electricity consumption. Individually, 189-331 TWh (0.68-1.19 EJ) were consumed for desalination, 85-279 TWh (0.31-1.00 EJ) for wastewater treatment and 105-549 TWh (0.38-1.98 EJ) for conventional drinking water treatment. The largest energetic tolls of the three technologies are found in the Middle East and North Africa (desalination), Western Europe (wastewater treatment) and South Asia (conventional drinking water treatment), where they contribute up to 18.6 %, 2.4 % and 4.7 % of the electricity consumption in these regions, respectively. Considering the identified uncertainties, the model framework can be used to represent spatially explicit patterns of energy consumption for water treatment in Integrated Assessment Models and Energy System Models. These developments enable projections of the future energy demands of water treatment technologies and a better understanding of the water-energy nexus, under global change and at multiple spatial scales.