In memoriam of Prof A. KlemmThe inhibitive effect of fructose, glucose, lactose, maltose, and sucrose against the iron corrosion is investigated using density functional theory at the B3LYP/6-31 G level (d) to search the relation between the molecular structure and corrosion inhibition. The electronic properties such as the energy of the highest occupied molecular orbital (HOMO), the energy of lowest unoccupied orbital (LUMO), the energy gap (LUMO-HOMO), quantum chemical parameters such as hardness, softness, the fraction of the electron transferred, and the electrophilicity index are reported. The inhibition efficiency of the investigated carbohydrates follows the trend: maltose < sucrose < lactose < fructose < glucose.