The electronic structure of croconic acid in the gas phase has been investigated by means of core level and valence band photoemission spectroscopy and compared with hybrid Heyd-Scuseria-Ernzerhof density functional theory calculations. The results have been compared with the corresponding ones of the condensed phase. In the gas phase, due to the absence of hydrogen bond intermolecular interactions, the O 1 s core level spectrum shows a shift of binding energy between the hydroxyl (O–H) and the carbonyl group (C=O) of 2.1 eV, which is larger than the condensed phase value of 1.6 eV. Interestingly, such a shift decreases exponentially with the increase of the O–H distance calculated from theory. The significant differences between the gas and condensed phase valence band spectra highlight the important role played by the hydrogen bonding in shaping the electronic structure of the condensed phase.