Glycans, consisting of covalently linked sugar units, are a major class of biopolymers essential to all known living organisms. To better understand their biological functions and further applications in fields from biomedicine to materials science, detailed knowledge of their structure is essential. However, due to the extraordinary complexity and conformational flexibility of glycans, state-of-the-art glycan analysis methods often fail to provide structural information with atomic precision. Here, we combine electrospray deposition in ultra-high vacuum with non-contact atomic force microscopy and theoretical calculations to unravel the structure of β-cyclodextrin, a cyclic glucose oligomer, with atomic-scale detail. Our results, established on the single-molecule level, reveal the different adsorption geometries and conformations of β-cyclodextrin. The position of individual hydroxy groups and the location of the stabilizing intramolecular H-bonds are deduced from atomically resolved images, enabling the unambiguous assignment of the molecular structure and demonstrating the potential of the method for glycan analysis.