The EAT-Lancet Commission has proposed a global benchmark diet to guide the shift towards healthy and sustainable dietary patterns. Yet it is unclear whether consumers' choices are convergent with those guidelines. Applying an advanced statistical analysis, we mapped the diet gap of 15 essential foods in 172 countries from 1961 to 2018. We found that countries at the highest level of development have an above-optimal consumption of animal products, fats and sugars but a sub-optimal consumption of legumes, nuts and fruits. Countries suffering from limited socio-economic progress primarily rely on carbohydrates and starchy roots. Globally, a gradual change towards healthy and sustainable dietary targets can be observed for seafood, milk products, poultry and vegetable oils. We show that if all countries adopted the EAT-Lancet diet, the water footprint would fall by 12% at a global level but increase for nearly 40% of the world's population. ©The Author(s), under exclusive licence to Springer Nature Limited 2022.