Abstract Recently, 31P two-dimensional (2D) NMR has been proposed as a powerful tool for direct investigations of the connectivities between the Qn units in glasses, i.e. the medium-range order. In this paper, the principles of these experiments and applications to both polycrystalline Mg2P2O7 and a Na2O-P205 glass are demonstrated, including a theoretical description and modelling of the polarization transfer between the two inequivalent phosphorus sites in the magnesium pyrophosphate.