Hospital-based transmission played a dominant role in MERS-CoV and SARS-CoV epidemics but large-scale studies of its role in the SARS-CoV-2 pandemic are lacking. Such transmission risks spreading the virus to the most vulnerable individuals and can have wider-scale impacts through hospital-community interactions. Using data from acute hospitals in England we quantify within-hospital transmission, evaluate likely pathways of spread and factors associated with heightened transmission risk, and explore the wider dynamical consequences. We show that hospital transmission is likely to have been a major contributor to the burden of COVID-19 in England. We estimate that between June 2020 and March 2021 between 95,000 and 167,000 patients acquired SARS-CoV-2 in hospitals with nosocomially-infected patients likely to have been the main sources of transmission to other patients. Increased transmission to patients was associated with hospitals having fewer single rooms and lower heated volume per bed. Moreover, we show that reducing hospital transmission could substantially enhance the efficiency of punctuated lockdown measures in suppressing community transmission. These findings reveal the previously unrecognised scale of hospital transmission, have direct implications for targeting of hospital control measures, and highlight the need to design hospitals better-equipped to limit the transmission of future high consequence pathogens.