We report the X-ray absorption of isolated H3O+ cations at the O 1s edge. The molecular ions were prepared in a flowing afterglow ion source which was designed for the production of small water clusters, protonated water clusters, and hydrated ions. Isolated H2O+ cations have been analyzed for comparison. The spectra show significant differences in resonance energies and widths compared to neutral H2O with resonances shifting to higher energies by as much as 10 eV and resonance widths increasing by as much as a factor of 5. The experimental results are supported by time-dependent density functional theory calculations performed for both molecular cations, showing a good agreement with the experimental data. The spectra reported here could enable the identification of the individual molecules in charged small water clusters or liquid water using X-ray absorption spectroscopy.