The radial density profiles of Ne 10+ and Ne 8+ have been measured with charge exchange recombination spectroscopy in an H-mode discharge in ASDEX Upgrade. When trying to fit the data with an impurity transport code that only takes electronic ionisation and recombination into account, the density of Ne 8+ is too low by more than an order of magnitude indicating that an additional recombination mechanism must be at work. We ascribe the missing recombination channel to charge exchange (CX) reactions between neutral deuterium and the impurity ions, which has long been known to be a very efficient recombination reaction. Including the CXreactions yields a good fit of the ionisation balance and delivers the neutral density profile in the pedestal, which is not known from other diagnostics. Here, the CXreactions lead to a change of the ionisation balance on the whole flux surface and the measurement delivers a flux surface averaged neutral density with the exception of the region very close to the X-point. Furthermore, it leads to an increase of the pedestal radiation of neon since the partially ionised stages can emit line radiation. This amounts to an increase of the radiated power of neon inside of the separatrix by a factor of 5. A similar analysis was done for argon in an H-mode discharge dominated by Ar radiation. Only the CX-recombination in the pedestal can explain the radiated power inside the separatrix, which would be too low by a factor of 2.2 without CX. In addition, the radiances of VUV lines from many charge stages are much better fitted when including the CX-recombination. A simple projection of the impact of CX-recombination to the much hotter ITER pedestals shows that for elements up to Kr, a beneficial increase of edge radiated power per core radiated power and of radiated power per central dilution is obtained, while for Xe and especially for W the effect is weak.