Inflammatory bowel disease (IBD) has been associated with underweight and malnutrition, but obesity may also serve as a negative prognostic factor. This study aimed to present the longitudinal course of height, weight, and body mass index (BMI) of children from IBD diagnosis to 18 months of follow-up, and to describe the impact of BMI on the clinical course of the disease. One hundred and fifty-two children were identified, of whom 85 had Crohn’s disease (CD) and 67 had ulcerative colitis (UC). During a median (interquartile range) follow-up of 2.95 (1.73–4.5) years, weight and BMI Z-scores increased in the first 18 months since diagnosis in both the CD (P < 0.001) and UC (P < 0.028) groups. BMI in lower and upper quartiles at diagnosis was associated with higher risk of hospitalization (hazard ratio [HR] = 2.72, P = 0.021). In a multivariate analysis, BMI in the lower quartile at diagnosis and at 6, 12, and 18 months was associated with higher risk of disease exacerbation (HR = 2.36, 1.90, 1.98, and 2.43, respectively, P < 0.021), as was BMI in the upper quartile (HR = 2.59, 2.91, and 2.29, respectively, P < 0.013). Conclusion: BMI in the lower and upper quartiles at diagnosis and during follow-up was associated with a more severe disease course in children with IBD.• Inflammatory bowel disease (IBD) has been associated with underweight and malnutrition.• The impacts of weight and body mass index (BMI) on the presentation and course of IBD have been mainly investigated in the adult population.• In the era of the obesity epidemic, this study identifies both low and high BMIs at diagnosis and at follow-up as a marker for poor outcome in pediatric IBD.• The results support using BMI as a predictor of IBD course and prognosis.