In our previous study (Mustan et al. 2021) we showed that foams formed from two oil-soluble nonionic surfactants (Span 60 and Brij 72) can remain stable for more than 10 days at room temperature at high sugar concentration. The major aim of the current study is to reveal the interrelation between the surfactant structure and foam stability by investigating 6 polyoxyethelene alkyl ethers and 12 fatty acid esters with a wide variety of hydrophobic chain lengths (C12; C16; C18 and C18:1) and hydrophilic head-groups (sorbitol, glycerol, sucrose). Foams stable for more than 100 days at room temperature are obtained when sucrose palmitate or stearate (P1670 or S1670) are used as surfactants. This exceptional foam stability is related to the gelation of the aqueous phase and to the formation of solid adsorption layer with zero surface tension upon compression, thus preventing water drainage and decelerating the bubble Ostwald ripening. The foam stability decreases with (i) increasing the number of EO groups in polyoxyethylene alkyl ethers and in fatty acid sorbitan esters; (ii) decreasing the number of C-atoms in the surfactant tail for all studied surfactants; (iii) addition of double bond in the surfactant tail. The lower foam stability in all three cases is related to the worse packing of the surfactant molecules within the adsorption layer, leading to faster Ostwald ripening and subsequent bubble coalescence. The diesters present as admixture in the fatty acid esters play an important role in the foam stabilization by further compacting the adsorption layers and lowering the rate of Ostwald ripening. These conclusions can be used as a predictive tool for surfactant selection in the development of food or pharmaceutical foam concentrates that can be diluted before final use.