Silk is an exceptionally strong, extensible, and tough material made from simple protein building blocks. The molecular structure of dragline spider silk repeat units consists of semiamorphous and nanocrystalline β-sheet protein domains. Here we show by a series of computational experiments how the nanoscale properties of silk repeat units are scaled up to create macroscopic silk fibers with outstanding mechanical properties despite the presence of cavities, tears, and cracks. We demonstrate that the geometric confinement of silk fibrils to diameters of 50 ± 30 nm is critical to facilitate a powerful mechanism by which hundreds of thousands of protein domains synergistically resist deformation and failure to provide enhanced strength, extensibility, and toughness at the macroscale, closely matching experimentally measured mechanical properties. Through this mechanism silk fibers exploit the full potential of the nanoscale building blocks, regardless of the details of microscopic loading conditions and despite the presence of large defects. Experimental results confirm that silk fibers are composed of silk fibril bundles with diameters in the range of 20-150 nm, in agreement with our predicted length scale. Our study reveals a general mechanism to map nanoscale properties to the macroscale and provides a potent design strategy toward novel fiber and bulk nanomaterials through hierarchical structures.