ObjectivesTo describe the risk of venous thromboembolism (VTE), and risk factors for VTE, in people with immune-mediated inflammatory diseases (IMID) (ulcerative colitis, Crohn’s disease (CD), rheumatoid arthritis (RA) and psoriatic arthritis (PsA)), compared with a matched control population.MethodsA total of 53 378 people with an IMID were identified over 1999–2019 in the UK Royal College of General Practitioners (RCGP) Research and Surveillance Centre (RSC) primary care database and were matched to 213 512 people without an IMID. The association between the presence of any IMID, and each IMID separately, and risk of VTE was estimated using unadjusted and multivariable-adjusted Cox proportional hazards models. The prevalence of VTE risk factors, and associations between VTE risk factors and risk of VTE, were estimated in people with and without an IMID.ResultsPeople with an IMID were at increased risk of VTE (adjusted HR [aHR] 1.46, 95% CI 1.36,1.56), compared with matched controls. When assessing individual diseases, risk was increased for CD (aHR 1.74, 95% CI 1.45 to 2.08), ulcerative colitis (aHR 1.27, 95% CI 1.10 to 1.45) and RA (aHR 1.54, 95% CI 1.40 to 1.70) but there was no evidence of an association for PsA (aHR 1.21, 95% CI 0.96 to 1.52). In people with an IMID, independent risk factors for VTE included male sex, overweight/obese body mass index, current smoking, history of fracture, and, across study follow-up, abnormal platelet count.ConclusionsVTE risk is increased in people with IMIDs. Routinely available clinical information may be helpful to identify individuals with an IMID at increased future risk of VTE.Observational study registration numberClinicaltrials.gov (NCT03835780).