Although the scale of impending urbanization is well-acknowledged, we have a limited understanding of how urban forms will change and what their impact will be on building energy use. Using both top-down and bottom-up approaches and scenarios, we examine building energy use for heating and cooling. Globally, the energy use for heating and cooling by the middle of the century will be between 45 and 59 exajoules per year (corresponding to an increase of 7–40% since 2010). Most of this variability is due to the uncertainty in future urban densities of rapidly growing cities in Asia and particularly China. Dense urban development leads to less urban energy use overall. Waiting to retrofit the existing built environment until markets are ready in about 5 years to widely deploy the most advanced renovation technologies leads to more savings in building energy use. Potential for savings in energy use is greatest in China when coupled with efficiency gains. Advanced efficiency makes the least difference compared with the business-as-usual scenario in South Asia and Sub-Saharan Africa but significantly contributes to energy savings in North America and Europe. Systemic efforts that focus on both urban form, of which urban density is an indicator, and energy-efficient technologies, but that also account for potential co-benefits and trade-offs with human well-being can contribute to both local and global sustainability. Particularly in growing cities in the developing world, such efforts can improve the well-being of billions of urban residents and contribute to mitigating climate change by reducing energy use in urban areas.