The diffusion of water in a peralkaline and a peraluminous rhyolitic melt was investigated at temperatures of 714–1,493 K and pressures of 100 and 500 MPa. At temperatures below 923 K dehydration experiments were performed on glasses containing about 2 wt% H2O t in cold seal pressure vessels. At high temperatures diffusion couples of water-poor (<0.5 wt% H2O t ) and water-rich (~2 wt% H2O t ) melts were run in an internally heated gas pressure vessel. Argon was the pressure medium in both cases. Concentration profiles of hydrous species (OH groups and H2O molecules) were measured along the diffusion direction using near-infrared (NIR) microspectroscopy. The bulk water diffusivity ( $$D_{{{\text{H}}_{2} {\text{O}}_{t} }}^{{}}$$ ) was derived from profiles of total water ( $$C_{{{\text{H}}_{2} {\text{O}}_{t} }}^{{}}$$ ) using a modified Boltzmann-Matano method as well as using fittings assuming a functional relationship between $$D_{{{\text{H}}_{2} {\text{O}}_{t} }}^{{}}$$ and $$C_{{{\text{H}}_{2} {\text{O}}_{t} }}^{{}}.$$ Both methods consistently indicate that $$D_{{{\text{H}}_{2} {\text{O}}_{t} }}^{{}}$$ is proportional to $$C_{{{\text{H}}_{2} {\text{O}}_{t} }}^{{}}$$ in this range of water contents for both bulk compositions, in agreement with previous work on metaluminous rhyolite. The water diffusivity in the peraluminous melts agrees very well with data for metaluminous rhyolites implying that an excess of Al2O3 with respect to alkalis does not affect water diffusion. On the other hand, water diffusion is faster by roughly a factor of two in the peralkaline melt compared to the metaluminous melt. The following expression for the water diffusivity in the peralkaline rhyolite as a function of temperature and pressure was obtained by least-squares fitting: $$ \log D_{{{\text{H}}_{2} {\text{O}}_{t} }}^{{1\,{\text{wt}}\% }} = ( - 7.09 \pm 0.15) - \frac{(4,\!788 \pm 166) + (0.56 \pm 0.21) \times P}{T} $$ where $$ D_{{{\text{H}}_{2} {\text{O}}_{t} }}^{{1\,{\text{wt}}\% }} $$ is the water diffusivity at 1 wt% H2O t in m2/s, T is the temperature in K and P is the pressure in MPa. The above equation reproduces the experimental data (14 runs in total) with a standard fit error of 0.15 log units. It can be employed to model degassing of peralkaline melts at water contents up to 2 wt%.