- Purpose: To determine whether children born to mothers with gestational diabetes mellitus (GDM) are at increased risk to develop of pediatric ophthalmic morbidity. Materials and methods: In this population based cohort study, all deliveries between 1991–2014 were included. Congenital malformations, multiple gestations and patients lacking prenatal care were excluded from analysis. Mothers were defined as either having no GDM, having diet treated GDM, or medically treated GDM. Outcomes were defined as different ophthalmic morbidities of the offspring until the age of 18. Kaplan-Meier curves were used to compare the cumulative morbidity in each group, and a Cox proportional hazard model was used to control for possible confounders. Results: During the study period, 238 622 deliveries met the inclusion criteria, of those 4.0% (n = 9601) of mothers were diagnosed with GDM treated by diet, and an additional 1.0% (n = 2398) were diagnosed with GDM treated by medication. Offsprings of patients with GDM treated by medication had a higher cumulative incidence of ophthalmic morbidity when compared to the other groups (Kaplan-Meier log rank test p = 0.038). GDM treated by medication was found to be an independent risk factor for long-term ophthalmic morbidity, in a cox multivariable model (adjusted HR: 1.5, 95% CI: 1.05–2.1, p = 0.025). Conclusion: Gestational diabetes mellitus treated by medication is associated with an increased risk for long-term pediatric ophthalmic morbidity.