Aims/IntroductionWe investigated the association between gestational diabetes mellitus (GDM) and perinatal outcomes stratified by pre‐pregnancy body mass index (BMI) and/or gestational weight gain (GWG).Materials and MethodsData from the national birth cohort in the Japan Environment and Children's Study from 2011 to 2014 (n = 85,228) were used. Japan uses the GDM guidelines of the International Association of Diabetes and Pregnancy Study Groups. The odds ratios (ORs) of perinatal outcomes were compared between women with and those without GDM.ResultsThe OR (95% confidence interval) of having a small for gestational age infant in the GDM group with a pre‐pregnancy BMI of ≥25.0 kg/m2 and insufficient GWG (<2.75 kg) was 1.78 (1.02–3.12). The OR of having a large for gestational age infant of the same BMI group with excessive GWG (>7.25 kg) was 2.04 (1.56–2.67). The OR of hypertensive disorders of pregnancy was higher in women with a BMI ≥18.5 kg/m2 in the GDM group than in the non‐GDM group.ConclusionsLarge for gestational age and hypertensive disorders of pregnancy were associated with pre‐pregnancy BMI and GWG in either normal weight or overweight/obese women, and the relationship was strengthened when GDM was present. Women with GDM and a BMI of ≥25.0 kg/m2 are at risk of having small for gestational age and large for gestational age infants depending on GWG.