Many electronic systems depend on microelectromechanical system and nanoelectromechanical system resonators for frequency control applications such as clock signal generation and wireless communication. Hundreds of resonators with frequencies from 32 kHz to 6 GHz can be heterogeneously integrated with complementary metal–oxide–semiconductor circuits. However, heterogeneous integration creates large overheads—such as system size and power consumption—limiting the potential for dynamic spectrum use and frequency extension to centimetre- and millimetre-wave regimes. Here we report switchable nanoelectromechanical system resonators with wide spectrum coverage, which are based on hafnia–zirconia–alumina (Hf0.5Zr0.5O2–Al2O3) superlattice transducers. The superlattice structure, together with pulsed-poling-induced ferroelastic reorientation, enables large linear electromechanical coupling and high quality factor in lateral- and thickness-oriented bulk acoustic wave modes. The monolithic nanoelectromechanical system resonators offer frequencies of 0.4–17.3 GHz, frequency–quality products up to 4.04 × 1012 Hz and electromechanical couplings of 2.5%. Using a d.c. bias voltage to depolarize the transducers, we also show that the resonators can be switched off to their electromechanical noise floor, creating an on/off isolation of 37 dB. Piezoelectric transducers based on ferroelectric hafnia–zirconia–alumina can be used to create nanoelectromechanical resonators that operate between 0.4 and 17.3 GHz and have an on/off isolation of 37 dB.