Epithelial organoids recapitulate multiple aspects of real organs, making them promising models of organ development, function and disease. However, the full potential of organoids in research and therapy has remained unrealized, owing to the poorly defined animal-derived matrices in which they are grown. Here we used modular synthetic hydrogel networks to define the key extracellular matrix (ECM) parameters that govern intestinal stem cell (ISC) expansion and organoid formation, and show that separate stages of the process require different mechanical environments and ECM components. In particular, fibronectin-based adhesion was sufficient for ISC survival and proliferation. High matrix stiffness significantly enhanced ISC expansion through a yes-associated protein 1 (YAP)-dependent mechanism. ISC differentiation and organoid formation, on the other hand, required a soft matrix and laminin-based adhesion. We used these insights to build a fully defined culture system for the expansion of mouse and human ISCs. We also produced mechanically dynamic matrices that were initially optimal for ISC expansion and subsequently permissive to differentiation and intestinal organoid formation, thus creating well-defined alternatives to animal-derived matrices for the culture of mouse and human stem–cell-derived organoids. Our approach overcomes multiple limitations of current organoid cultures and greatly expands their applicability in basic and clinical research. The principles presented here can be extended to identify designer matrices that are optimal for long-term culture of other types of stem cells and organoids.