The ability of superhydrophobic surfaces to stay dry, self-clean and avoid biofouling is attractive for applications in biotechnology, medicine and heat transfer. Water droplets that contact these surfaces must have large apparent contact angles (greater than 150 degrees) and small roll-off angles (less than 10 degrees). This can be realized for surfaces that have low-surface-energy chemistry and micro- or nanoscale surface roughness, minimizing contact between the liquid and the solid surface. However, rough surfaces—for which only a small fraction of the overall area is in contact with the liquid—experience high local pressures under mechanical load, making them fragile and highly susceptible to abrasion. Additionally, abrasion exposes underlying materials and may change the local nature of the surface from hydrophobic to hydrophilic, resulting in the pinning of water droplets to the surface. It has therefore been assumed that mechanical robustness and water repellency are mutually exclusive surface properties. Here we show that robust superhydrophobicity can be realized by structuring surfaces at two different length scales, with a nanostructure design to provide water repellency and a microstructure design to provide durability. The microstructure is an interconnected surface frame containing ‘pockets’ that house highly water-repellent and mechanically fragile nanostructures. This surface frame acts as ‘armour’, preventing the removal of the nanostructures by abradants that are larger than the frame size. We apply this strategy to various substrates—including silicon, ceramic, metal and transparent glass—and show that the water repellency of the resulting superhydrophobic surfaces is preserved even after abrasion by sandpaper and by a sharp steel blade. We suggest that this transparent, mechanically robust, self-cleaning glass could help to negate the dust-contamination issue that leads to a loss of efficiency in solar cells. Our design strategy could also guide the development of other materials that need to retain effective self-cleaning, anti-fouling or heat-transfer abilities in harsh operating environments.