X-ray photoelectron spectra of the core and valence levels of the fundamental building blocks of β-lactam antibiotics have been investigated and compared with theoretical calculations. The spectra of the compounds 2-azetidinone and the 2- and 4-isomers of thiazolidinecarboxylic acid are interpreted in the light of theoretical calculations. The spectra of the two isomers of thiazolidinecarboxylic acid are rather similar, as expected, but show clear effects due to isomerization. Both isomers are analogues of proline, which is wellknown\ to populate several low energy conformers in the gas phase. We have investigated the low energy conformers of thiazolidine-4-carboxylic acid theoretically in more detail and find some spectroscopic evidence that multiple conformers may be present. The measured valence levels are assigned for all three compounds, and the character of the frontier orbitals is identified and analyzed.