Silicate glasses have evolved from basic structural materials to enabling materials for advanced applications. In this article, we unravel the origin of the mixed alkali effect for alkali silicate 22.7R2O–77.3SiO2 glasses (R = Na and/or K) by identifying the variation in the alkali ion location around the non-bridging oxygen atoms. To do so, we constructed a state-of-the art structural model, which reproduces both diffraction and NMR data with a particular focus on the behavior of the alkali ions. A novel topological analysis using persistent homology found that sodium-potassium silicate glass shows a significant reduction in large cavities as a result of the mixed alkali effect. Furthermore, a highly correlated pair arrangement between sodium and potassium ions around non-bridging oxygen atoms was identified. The potassium ions can be trapped in K–O polyhedra due to the increased bridging oxygen coordination; therefore, the correlated pair arrangement is likely the intrinsic origin of the mixed alkali effect.