Stem cells (SCs) decision to self-renew or differentiate largely depends on the extracellular environment and elasticity of their niche. A well-described mediator of the mechanotransduction pathway is the co-transcriptional activator Yes-associated protein (YAP), known to shuttle into the nucleus of cells grown on stiff matrices. YAP is also known to be essential for stemness, but confusingly, SCs often reside in soft niches. Furthermore, the role of matrix rigidity in niche formation and SC function in vivo is poorly understood. Here we report that the post-natal development of the murine corneal epithelium involves matrix stiffening and loss of YAP activity that is associated with the formation of differentiation compartment. Importantly, manipulating the matrix crosslinking enzyme, Lox, perturbed SC mark expression and resulted in loss of corneal transparency. In agreement, we found that YAP and mechanotransduction pathways are essential for stemness in the soft niche compartment, wound healing response, and dedifferentiation of committed cells into SCs following SC depletion. In vitro experiments revealed that stiffer substrates induced cytoplasmic YAP localization through activation of LATS1/2, facilitating SMAD2/3-mediated cell differentiation. Taken together, we propose that the soft environment of the corneal SC niche maintains YAP activity to support SC regulation during morphogenesis, adult homeostasis and regeneration by the niche.