Studies in mice suggest that early life represents a critical time window, where antibiotics may exert profound and lasting effects on the gut microbiota and metabolism. We aimed to test the hypothesis that prenatal antibiotic exposure is associated with increased risk of childhood overweight in a population-based cohort study. We linked 43,365 mother-child dyads from a nationwide cohort of pregnant women and their offspring to the Danish National Prescription Registry. Linear and logistic regression models were used to examine associations between prenatal exposure to antibiotics and BMI z-score and overweight (including obesity) at age seven and 11 years. Prenatal antibiotic exposure and childhood overweight were both associated with high pre-pregnancy BMI, maternal diabetes, multi-parity, smoking, low socioeconomic status, high paternal BMI, and short duration of breastfeeding. After adjustment for confounders, no associations were observed between prenatal antibiotic exposure and odds of overweight at age seven and 11 years. Whereas no association was observed between broad-spectrum antibiotics and overweight at age 11 years, exposure to broad-spectrum antibiotics was associated with higher odds of overweight at age seven years with an odds ratio of 1.27 (95% CI, 1.05-1.53) for ampicillin and an odds ratio of 1.56 (95% CI, 1.23-1.97) for amoxicillin. As we did not account for underlying infections, the observed associations with early childhood overweight could be explained by confounding by indication. In conclusion, our population-based study suggests that prenatal exposure to narrow-spectrum antibiotics is not associated with overweight in offspring. Exposure to some broad-spectrum antibiotics may increase the odds of overweight in early childhood, but the association does not persist in later childhood.