We use cosmological observations in the post-Planck era to derive limits on thermally produced cosmological axions. In the early universe such axions contribute to the radiation density and later to the hot dark matter fraction. We find an upper limit m_a < 0.67 eV at 95% C.L. after marginalising over the unknown neutrino masses, using CMB temperature and polarisation data from Planck and WMAP respectively, the halo matter power spectrum extracted from SDSS-DR7, and the local Hubble expansion rate H_0 released by the Carnegie Hubble Program based on a recalibration of the Hubble Space Telescope Key Project sample. Leaving out the local H_0 measurement relaxes the limit somewhat to 0.86 eV, while Planck+WMAP alone constrain the axion mass to 1.01 eV, the first time an upper limit on m_a has been obtained from CMB data alone. Our axion limit is therefore not very sensitive to the tension between the Planck-inferred H_0 and the locally measured value. This is in contrast with the upper limit on the neutrino mass sum, which we find here to range from 0.27 eV at 95% C.L. combining all of the aforementioned observations, to 0.84 eV from CMB data alone.