BACKGROUND AND AIMS: Previous studies indicate an increased risk of sexual dysfunction in women with inflammatory bowel disease [IBD] but none have examined sexual function in a large population-based cohort. METHODS: To investigate the risk of sexual dysfunction in women with IBD, we used data from the Danish National Birth Cohort, a nationwide study of 92 274 pregnant women recruited during 1996-2002. We performed a cross-sectional study based on mothers who participated in the Maternal Follow-up in 2013-14. The outcome was self-reported sexual health. Information regarding demographics and IBD characteristics was retrieved from the Danish National Patient Register. Using regression models and adjusting for important confounders, we compared sexual function in women with and without IBD. RESULTS: The study population consisted of 38 011 women including 196 [0.5%] with Crohn's disease [CD] and 409 [1.1%] with ulcerative colitis [UC]. Median age was 44 years. Compared to women without IBD, women with UC did not have significantly decreased sexual function, while women with CD had more difficulty achieving orgasm (adjusted odds ratio [aOR] 1.53; 95% confidence interval [CI] 1.02-2.30], increased dyspareunia [aOR 1.71; 95% CI 1.11-2.63] and deep dyspareunia [aOR 2.00; 95% CI 1.24-3.22]. The risk for difficulty achieving orgasm and deep dyspareunia was further increased within 2 years of an IBD-related contact/visit [aOR 1.81; 95% CI 1.11-2.95; and aOR 2.37; 95% CI 1.34-4.19]. CONCLUSIONS: Women with CD have significantly increased difficulty achieving orgasm and increased dyspareunia. Physicians should be cognizant of and screen for sexual dysfunction in this group of patients.