A zero net energy (ZNE) building is a home or commercial building that on average produces as much energy as it uses, achieved through energy efficiency and renewable technologies. Building energy codes can help us transition to ZNE construction for new residential and commercial buildings by 2030. We will need to expand the scope of codes to capture all building energy uses, address whole building systems instead of focusing on individual components, and shift our focus from building design to actual building energy use by adopting outcome-based codes. We should also ensure ZNE performance post-occupancy by considering the impact of building occupants and operators and by incorporating future-proofing measures. By addressing these areas, we can establish the foundation for ZNE by 2030 while providing energy savings and related benefits in the interim. Complementary policies, targeted research, market transformation, and the coordination of efforts and advocacy will help us achieve these goals.