A central goal of regenerative medicine is to generate transplantable organs from cells derived or expanded in vitro. Although numerous studies have demonstrated the production of defined cell types in vitro, the creation of a fully intact organ has not been reported. The transcription factor forkhead box N1 (FOXN1) is critically required for development of thymic epithelial cells (TECs), a key cell type of the thymic stroma. Here, we show that enforced Foxn1 expression is sufficient to reprogramme fibroblasts into functional TECs, an unrelated cell type across a germ-layer boundary. These FOXN1-induced TECs (iTECs) supported efficient development of both CD4(+) and CD8(+) T cells in vitro. On transplantation, iTECs established a complete, fully organized and functional thymus, that contained all of the TEC subtypes required to support T-cell differentiation and populated the recipient immune system with T cells. iTECs thus demonstrate that cellular reprogramming approaches can be used to generate an entire organ, and open the possibility of widespread use of thymus transplantation to boost immune function in patients.