Background: Aspirin has been proposed as a treatment for COVID-19 on the basis of its anti-thrombotic properties. We aimed to evaluate the efficacy and safety of aspirin in patients admitted to hospital with COVID-19. Methods: In this randomised, controlled, open-label, platform trial, several possible treatments were compared with usual care in patients hospitalised with COVID-19. The trial took place at 177 hospitals in the UK, two hospitals in Indonesia, and two hospitals in Nepal. Eligible and consenting adults were randomly allocated in a 1:1 ratio to either usual standard of care plus 150 mg aspirin once per day until discharge or usual standard of care alone using web-based simple (unstratified) randomisation with allocation concealment. The primary outcome was 28 day mortality. All analyses were done by intention to treat. The trial is registered with ISRCTN (50189673) and ClinicalTrials.gov (NCT04381936). Findings: Between Nov 1, 2020, and March 21, 2021, 14 892 (66%) of 22 560 patients enrolled into the RECOVERY trial were eligible to be randomly allocated to aspirin. 7351 patients were randomly allocated (1:1) to receive aspirin and 7541 patients to receive usual care alone. Overall, 1222 (17%) of 7351 patients allocated to aspirin and 1299 (17%) of 7541 patients allocated to usual care died within 28 days (rate ratio 0·96, 95% CI 0·89–1·04; p=0·35). Consistent results were seen in all prespecified subgroups of patients. Patients allocated to aspirin had a slightly shorter duration of hospitalisation (median 8 days, IQR 5 to >28, vs 9 days, IQR 5 to >28) and a higher proportion were discharged from hospital alive within 28 days (75% vs 74%; rate ratio 1·06, 95% CI 1·02–1·10; p=0·0062). Among patients not on invasive mechanical ventilation at baseline, there was no significant difference in the proportion meeting the composite endpoint of invasive mechanical ventilation or death (21% vs 22%; risk ratio 0·96, 95% CI 0·90–1·03; p=0·23). Aspirin use was associated with a reduction in thrombotic events (4·6% vs 5·3%; absolute reduction 0·6%, SE 0·4%) and an increase in major bleeding events (1·6% vs 1·0%; absolute increase 0·6%, SE 0·2%). Interpretation: In patients hospitalised with COVID-19, aspirin was not associated with reductions in 28 day mortality or in the risk of progressing to invasive mechanical ventilation or death, but was associated with a small increase in the rate of being discharged alive within 28 days. Funding: UK Research and Innovation (Medical Research Council), National Institute of Health Research, and the Wellcome Trust through the COVID-19 Therapeutics Accelerator.