We study the structure of high-speed zero-pressure-gradient turbulent boundary layers up to friction Reynolds number $Re_{\tau } \approx 2000$ using direct numerical simulation of the Navier–Stokes equations. Both supersonic and hypersonic conditions with nominal free-stream Mach numbers $M_{\infty }=2$, $M_{\infty }=5.86$ and heat transfer at the wall are considered. The present simulations extend the database currently available for wall-bounded flows, enabling us to explore high-Reynolds-number effects even in the hypersonic regime. We first analyse the instantaneous fields to characterize the structure of both velocity and temperature fluctuations. In all cases elongated strips of uniform velocity and temperature (superstructures) are observed in the outer portion of the boundary layer, characterized by a clear association between low-/high-speed momentum and high/low temperature streaks. The results highlight important deviations from the typical organization observed in the inner region of adiabatic boundary layers, revealing that the near-wall temperature streaks disappear in strongly non-adiabatic flow cases. We also focus on the structural properties of regions of uniform streamwise momentum (De Silva, Hutchins & Marusic, J. Fluid Mech., vol. 786, 2016, pp. 309–331) observed in turbulent boundary layers, confirming the presence of such zones in the high-speed regime at high Reynolds number and revealing the existence of similar regions for the temperature field. The accuracy of different compressibility transformations and temperature–velocity relations is assessed extending their range of validation to moderate/high Reynolds numbers. Spanwise spectral densities of the velocity and temperature fluctuations at various wall distances have been calculated revealing the energy content and the size of the turbulent eddies across the boundary layer. Finally, we propose a revised scaling for the characteristic length scales, that is based on the local mean shear computed according to the recent theory by Griffin, Fu & Moin [Proc. Natl Acad. Sci. USA, vol. 118 (34)].