Congenital heart defects constitute the most common human birth defect, however understanding of how these disorders originate is limited by our ability to model the human heart accurately in vitro. Here we report a method to generate developmentally relevant human heart organoids by self-assembly using human pluripotent stem cells. Our procedure is fully defined, efficient, reproducible, and compatible with high-content approaches. Organoids are generated through a three-step Wnt signaling modulation strategy using chemical inhibitors and growth factors. Heart organoids are comparable to age-matched human fetal cardiac tissues at the transcriptomic, structural, and cellular level. They develop sophisticated internal chambers with well-organized multi-lineage cardiac cell types, recapitulate heart field formation and atrioventricular specification, develop a complex vasculature, and exhibit robust functional activity. We also show that our organoid platform can recreate complex metabolic disorders associated with congenital heart defects, as demonstrated by an in vitro model of pregestational diabetes-induced congenital heart defects.