1. Unhealthy and unsustainably produced food poses a global risk to people and the planet. More than 820 million people have insufficient food and many more consume an unhealthy diet that contributes to premature death and morbidity. Moreover, global food production is the largest pressure caused by humans on Earth, threatening local ecosystems and the stability of the Earth system. 2. Current dietary trends, combined with projected population growth to about 10 billion by 2050, will exacerbate risks to people and planet. The global burden of non-communicable diseases is predicted to worsen and the effects of food production on greenhouse-gas emissions, nitrogen and phosphorus pollution, biodiversity loss, and water and land use will reduce the stability of the Earth system. 3. Transformation to healthy diets from sustainable food systems is necessary to achieve the UN Sustainable Development Goals and the Paris Agreement, and scientific targets for healthy diets and sustainable food production are needed to guide a Great Food Transformation. 4. Healthy diets have an appropriate caloric intake and consist of a diversity of plant-based foods, low amounts of animal source foods, unsaturated rather than saturated fats, and small amounts of refined grains, highly processed foods, and added sugars. 5. Transformation to healthy diets by 2050 will require substantial dietary shifts, including a greater than 50% reduction in global consumption of unhealthy foods, such as red meat and sugar, and a greater than 100% increase in consumption of healthy foods, such as nuts, fruits, vegetables, and legumes. However, the changes needed differ greatly by region. 6. Dietary changes from current diets to healthy diets are likely to substantially benefit human health, averting about 10·8–11·6 million deaths per year, a reduction of 19·0–23·6%. 7. With food production causing major global environmental risks, sustainable food production needs to operate within the safe operating space for food systems at all scales on Earth. Therefore, sustainable food production for about 10 billion people should use no additional land, safeguard existing biodiversity, reduce consumptive water use and manage water responsibly, substantially reduce nitrogen and phosphorus pollution, produce zero carbon dioxide emissions, and cause no further increase in methane and nitrous oxide emissions. 8. Transformation to sustainable food production by 2050 will require at least a 75% reduction of yield gaps, global redistribution of nitrogen and phosphorus fertiliser use, recycling of phosphorus, radical improvements in efficiency of fertiliser and water use, rapid implementation of agricultural mitigation options to reduce greenhouse-gas emissions, adoption of land management practices that shift agriculture from a carbon source to sink, and a fundamental shift in production priorities. 9. The scientific targets for healthy diets from sustainable food systems are intertwined with all UN Sustainable Development Goals. For example, achieving these targets will depend on providing high-quality primary health care that integrates family planning and education on healthy diets. These targets and the Sustainable Development Goals on freshwater, climate, land, oceans, and biodiversity will be achieved through strong commitment to global partnerships and actions. 10. Achieving healthy diets from sustainable food systems for everyone will require substantial shifts towards healthy dietary patterns, large reductions in food losses and waste, and major improvements in food production practices. This universal goal for all humans is within reach but will require adoption of scientific targets by all sectors to stimulate a range of actions from individuals and organisations working in all sectors and at all scales.