Background Intrapartum antibiotic prophylaxis (IAP) reduces a newborn’s risk of group B streptococcal infection (GBS) but may lead to an increased childhood body mass index (BMI). Methods This was a retrospective cohort study of infants (n = 223 431) born 2007–2015 in an integrated healthcare system. For vaginal delivery, we compared children exposed to GBS-IAP and to any other type or duration of intrapartum antibiotics to no antibiotic exposure. For cesarean delivery, we compared children exposed to GBS-IAP to those exposed to all other intrapartum antibiotics, including surgical prophylaxis. BMI over 5 years was compared using nonlinear multivariate models with B-spline functions, stratified by delivery mode and adjusted for demographics, maternal factors, breastfeeding, and childhood antibiotic exposure. Results In vaginal deliveries, GBS-IAP was associated with higher BMI from 0.5 to 5.0 years of age compared to no antibiotics (P Conclusions GBS-IAP was associated with a small but sustained increase in BMI starting at very early age. This association highlights the need to better understand the effects of perinatal antibiotic exposure on childhood health.