Diabetes mellitus (DM), currently affecting more than 537 million people worldwide is a chronic disease characterized by impaired glucose metabolism resulting from a defect in insulin secretion, action, or both due to the loss or dysfunction of pancreatic β cells. Since cadaveric islet transplantation using Edmonton protocol has served as an effective intervention to restore normoglycaemia in T1D patients for months, stem cell-derived β cells have been explored for cell replacement therapy for diabetes. Thus, great effort has been concentrated by scientists on developing in vitro differentiation protocols to realize the therapeutic potential of hPSC-derived β cells. However, most of the 2D traditional monolayer culture could mainly generate insulin-producing β cells with immature phenotype. In the body, pancreatic islets are 3D cell arrangements with complex cell–cell and cell–ECM interactions. Therefore, it is important to consider the spatial organization of the cell in the culture environment. More recently, 3D cell culture platforms have emerged as powerful tools with huge translational potential, particularly for stem cell research. 3D protocols provide a better model to recapitulate not only the in vivo morphology, but also the cell connectivity, polarity, and gene expression mimicking more physiologically the in vivo cell niche. Therefore, the 3D culture constitutes a more relevant model that may help to fill the gap between in vitro and in vivo models. Interestingly, most of the 2D planar methodologies that successfully generated functional hPSC-derived β cells have switched to a 3D arrangement of cells from pancreatic progenitor stage either as suspension clusters or as aggregates, suggesting the effect of 3D on β cell functionality. In this review we highlight the role of dimensionality (2D vs 3D) on the differentiation efficiency for generation of hPSC-derived insulin-producing β cells in vitro. Consequently, how transitioning from 2D monolayer culture to 3D spheroid would provide a better model for an efficient generation of fully functional hPSC-derived β cells mimicking in vivo islet niche for diabetes therapy or drug screening.Video AbstractSupplementary InformationThe online version contains supplementary material available at 10.1186/s12964-023-01171-8.