The surface reactivity and hydrophilicity of silicate materials are key properties for various industrial applications. However, the structural origin of their affinity for water remains unclear. Here, based on reactive molecular dynamics simulations of a series of artificial glassy silica surfaces annealed at various temperatures and subsequently exposed to water, we show that silica exhibits a hydrophilic-to-hydrophobic transition driven by its silanol surface density. By applying topological constraint theory, we show that the surface reactivity and hydrophilic/hydrophobic character of silica are controlled by the atomic topology of its surface. This suggests that novel silicate materials with tailored reactivity and hydrophilicity could be developed through the topological nanoengineering of their surface.