Objective To estimate the risk of pulmonary embolism and venous thromboembolism in pregnant women after in vitro fertilisation. Design Cross sectional study. Setting Sweden. Participants 23 498 women who had given birth after in vitro fertilisation between 1990 and 2008 and 116 960 individually matched women with natural pregnancies. Main outcome measures Risk of pulmonary embolism and venous thromboembolism (identified by linkage to the Swedish national patient register) during the whole pregnancy and by trimester. Results Venous thromboembolism occurred in 4.2/1000 women (n=99) after in vitro fertilisation compared with 2.5/1000 (n=291) in women with natural pregnancies (hazard ratio 1.77, 95% confidence interval 1.41 to 2.23). The risk of venous thromboembolism was increased during the whole pregnancy (P<0.001) and differed between the trimesters (P=0.002). The risk was particularly increased during the first trimester, at 1.5/1000 after in vitro fertilisation versus 0.3/1000 (hazard ratio 4.22, 2.46 to 7.26). The proportion of women experiencing pulmonary embolism during the first trimester was 3.0/10 000 after in vitro fertilisation versus 0.4/10 000 (hazard ratio 6.97, 2.21 to 21.96). Conclusions In vitro fertilisation is associated with an increased risk of pulmonary embolism and venous thromboembolism during the first trimester. The risk of pulmonary embolism is low in absolute terms but because the condition is a leading cause of maternal mortality and clinical suspicion is critical for diagnosis, an awareness of this risk is important. Trial registration ClinicalTrials.gov NCT01524393.