Pancreatic beta cells are of great interest for biomedical research and regenerative medicine. Here we show the conversion of human fibroblasts towards an endodermal cell fate by employing non-integrative episomal reprogramming factors in combination with specific growth factors and chemical compounds. On initial culture, converted definitive endodermal progenitor cells (cDE cells) are specified into posterior foregut-like progenitor cells (cPF cells). The cPF cells and their derivatives, pancreatic endodermal progenitor cells (cPE cells), can be greatly expanded. A screening approach identified chemical compounds that promote the differentiation and maturation of cPE cells into functional pancreatic beta-like cells (cPB cells) in vitro. Transplanted cPB cells exhibit glucose-stimulated insulin secretion in vivo and protect mice from chemically induced diabetes. In summary, our study has important implications for future strategies aimed at generating high numbers of functional beta cells, which may help restoring normoglycemia in patients suffering from diabetes.