The aim of the study was to investigate the association between pre-gestational carbohydrate quality index (CQI) and the incidence of gestational diabetes mellitus (GDM). Data from the 'Seguimiento Universidad de Navarra' (SUN) cohort were used, which includes 3827 women who notified at least one pregnancy between December 1999 and December 2019. We used a validated semi-quantitative 136-item FFQ to evaluate dietary exposures at baseline and at 10-year follow-up. The CQI was defined by four criteria: glycaemic index, whole-grain/total-grain carbohydrate, dietary fibre intake and solid/total carbohydrate ratio. We fitted generalised estimating equations with repeated measurements of the CQI to assess its relationship with incident GDM. A total of 6869 pregnancies and 202 new cases of incident GDM were identified. The inverse association between the global quality of carbohydrate and the development of GDM was not statistically significant: OR the highest v. the lowest CQI category: 0 center dot 67, 95 % CI (0 center dot 40, 1 center dot 10), P-for trend = 0 center dot 10. Participants at the highest CQI category and with daily carbohydrate amounts >= 50 % of total energy intake had the lowest incidence of GDM (OR = 0 center dot 29 (95 % CI (0 center dot 09, 0 center dot 89)) compared with those with the lowest quality (lowest CQI) and quantity (<= 40 %). Further studies are needed to overcome the limitations of our study. Those studies should jointly consider the quality and the quantity of dietary carbohydrates, as the quality might be of importance, especially in women with a higher intake of carbohydrates.