Importance: The use of medical imaging has sharply increased over the last 2 decades. Imaging rates during pregnancy have not been quantified in a large, multisite study setting. Objective: To evaluate patterns of medical imaging during pregnancy. Design, Setting, and Participants: A retrospective cohort study was performed at 6 US integrated health care systems and in Ontario, Canada. Participants included pregnant women who gave birth to a live neonate of at least 24 weeks' gestation between January 1, 1996, and December 31, 2016, and who were enrolled in the health care system for the entire pregnancy. Exposures: Computed tomography (CT), magnetic resonance imaging, conventional radiography, angiography and fluoroscopy, and nuclear medicine. Main Outcomes and Measures: Imaging rates per pregnancy stratified by country and year of child's birth. Results: A total of 3497603 pregnancies in 2211789 women were included. Overall, 26% of pregnancies were from US sites. Most (92%) were in women aged 20 to 39 years, and 85% resulted in full-term births. Computed tomography imaging rates in the United States increased from 2.0 examinations/1000 pregnancies in 1996 to 11.4/1000 pregnancies in 2007, remained stable through 2010, and decreased to 9.3/1000 pregnancies by 2016, for an overall increase of 3.7-fold. Computed tomography rates in Ontario, Canada, increased more gradually by 2.0-fold, from 2.0/1000 pregnancies in 1996 to 6.2/1000 pregnancies in 2016, which was 33% lower than in the United States. Overall, 5.3% of pregnant women in US sites and 3.6% in Ontario underwent imaging with ionizing radiation, and 0.8% of women at US sites and 0.4% in Ontario underwent CT. Magnetic resonance imaging rates increased steadily from 1.0/1000 pregnancies in 1996 to 11.9/1000 pregnancies in 2016 in the United States and from 0.5/1000 pregnancies in 1996 to 9.8/1000 pregnancies in 2016 in Ontario, surpassing CT rates in 2013 in the United States and in 2007 in Ontario. In the United States, radiography rates doubled from 34.5/1000 pregnancies in 1996 to 72.6/1000 pregnancies in 1999 and then decreased to 47.6/1000 pregnancies in 2016; rates in Ontario slowly increased from 36.2/1000 pregnancies in 1996 to 44.7/1000 pregnancies in 2016. Angiography and fluoroscopy and nuclear medicine use rates were low (5.2/1000 pregnancies), but in most years, higher in Ontario than the United States. Imaging rates were highest for women who were younger than 20 years or aged 40 years or older, gave birth preterm, or were black, Native American, or Hispanic (US data only). Considering advanced imaging only, chest imaging of pregnant women was more likely to use CT in the United States and nuclear medicine imaging in Ontario. Conclusions and Relevance: The use of CT during pregnancy substantially increased in the United States and Ontario over the past 2 decades. Imaging rates during pregnancy should be monitored to avoid unnecessary exposure of women and fetuses to ionizing radiation.