Aims: Recent population-based data on drug utilization around pregnancy are lacking. This study aims to examine the prevalence of drug exposure in the Netherlands during the preconception, pregnancy and postpartum periods, with special emphasis on trends of potentially harmful medication over the years. Methods: A population-based study was conducted using records from the PHARMO Perinatal Research Network. From 1999 to 2017, the proportion of pregnancies during which women used any medication or potentially harmful medication was assessed, overall and stratified by timing of exposure relative to pregnancy and by the year of delivery. Results: Overall, 357 226 (73%) and 166 484 (34%) of 487 122 selected pregnancies were exposed to any and potentially harmful medication, respectively. Among these 487 122 pregnancies, preconception prevalence for use of potentially harmful medication was 43%, 24% during the first trimester, 19% during the second, 16% during the third, and 45% postpartum. A declining trend was observed for exposure to any medication, from 84% in 1999 to 68% in 2017. No clear changes were observed over time for the proportion of pregnancies exposed to potentially harmful medication. Conclusions: Our study shows that the use of potentially harmful medication was high over the last two decades. Although there was a declining trend over the years in overall medication use, during a steady one-third of pregnancies, women used potentially harmful medication. Our findings highlight the need for an increased sense of urgency among both healthcare providers and women of reproductive age regarding potential risks associated with pharmacological treatment during pregnancy.