The relationship between composition, structure, and resistance to fracture remains poorly understood. Here, based on molecular dynamics simulations, we report that sodium silicate glasses and calcium–silicate–hydrates feature an anomalous maximum in fracture toughness. In the framework of topological constraint theory, this anomaly is correlated to a flexible-to-rigid transition, driven by pressure or composition for sodium silicate and calcium–silicate–hydrates, respectively. This topological transition, observed for an isostatic network, is also shown to correspond to a ductile-to-brittle transition. At this state, the network is rigid but free of eigen-stress and features stress relaxation through crack blunting, resulting in optimal resistance to fracture. Our topological approach could therefore enable the computational design of tough inorganic solids, which has long been a “holy grail” within the non-metallic materials chemistry community.