We estimated an extra two (95% confidence interval (CI) 0, 3), one (95% CI 0, 2) and six (95% CI 2, 8) myocarditis events per 1 million people vaccinated with ChAdOx1, BNT162b2 and mRNA-1273, respectively, in the 28 days following a first dose and an extra ten (95% CI 7, 11) myocarditis events per 1 million vaccinated in the 28 days after a second dose of mRNA-1273. This compares with an extra 40 (95% CI 38, 41) myocarditis events per 1 million patients in the 28 days following a SARS-CoV-2 positive test. We also observed increased risks of pericarditis and cardiac arrhythmias following a positive SARS-CoV-2 test. Similar associations were not observed with any of the COVID-19 vaccines, apart from an increased risk of arrhythmia following a second dose of mRNA-1273. Subgroup analyses by age showed the increased risk of myocarditis associated with the two mRNA vaccines was present only in those younger than 40.