Carbon allotropes built from rings of two-coordinate atoms, known as cyclo[n]carbons, have fascinated chemists for many years, but until now they could not be isolated or structurally characterized because of their high reactivity. We generated cyclo[18]carbon (C18) using atom manipulation on bilayer NaCl on Cu(111) at 5 kelvin by eliminating carbon monoxide from a cyclocarbon oxide molecule, C24O6 Characterization of cyclo[18]carbon by high-resolution atomic force microscopy revealed a polyynic structure with defined positions of alternating triple and single bonds. The high reactivity of cyclocarbon and cyclocarbon oxides allows covalent coupling between molecules to be induced by atom manipulation, opening an avenue for the synthesis of other carbon allotropes and carbon-rich materials from the coalescence of cyclocarbon molecules.