The interior structure of the giant ice planets Uranus and Neptune, but also of newly discovered exoplanets, is loosely constrained, because limited observational data can be satisfied with various interior models. Although it is known that their mantles comprise large amounts of water, ammonia, and methane ices, it is unclear how these organize themselves within the planets—as homogeneous mixtures, with continuous concentration gradients, or as well-separated layers of specific composition. While individual ices have been studied in great detail under pressure, the properties of their mixtures are much less explored. We show here, using first-principles calculations, that the 2:1 ammonia hydrate, (H2O)(NH3)2, is stabilized at icy planet mantle conditions due to a remarkable structural evolution. Above 65 GPa, we predict it will transform from a hydrogen-bonded molecular solid into a fully ionic phase O2−(NH+4)2, where all water molecules are completely deprotonated, an unexpected bonding phenomenon not seen before. Ammonia hemihydrate is stable in a sequence of ionic phases up to 500 GPa, pressures found deep within Neptune-like planets, and thus at higher pressures than any other ammonia–water mixture. This suggests it precipitates out of any ammonia–water mixture at sufficiently high pressures and thus forms an important component of icy planets.