Few cost-effective strategies to shift dietary habits of populations in a healthier direction have been identified. We examined if participating in a chatbot health education program transmitted by Short Messages Service ("SMS-program") could improve adolescent dietary behaviors and body weight trajectories. We also explored possible added effects of maternal or peer involvement. We conducted a randomized controlled trial (RCT) among adolescents from the Danish National Birth Cohort (DNBC). Eligible were adolescents who during 2015 to 2016 at age 14 years had completed a questionnaire assessing height, weight, and dietary habits. Two thirds were offered participation in an SMS-program, whereas 1/3 ("non-SMS group") received no offer. The SMS program aimed to improve 3 key dietary intake behaviors: sugar-sweetened beverages (SSBs), fruit and vegetables (FV), and fish. The offered programs had 3 factorially randomized schemes; the aims of these were to test effect of asking the mother or a friend to also participate in the health promotion program, and to test the effect of a 4-week individually tailored SMS program against the full 12-week SMS program targeting all 3 dietary factors. Height and weight and intakes of SSB, FV, and fish were assessed twice by a smartphone-based abbreviated dietary questionnaire completed at 6 months (m) and 18 m follow-up. Main outcome measures were (1) body mass index (BMI) z-score; and (2) an abbreviated Healthy Eating Index (mini-HEI, 1 m window, as mean of z-scores for SSB, FV, and fish). Among the 7,890 randomized adolescents, 5,260 were assigned to any SMS program; 63% (3,338) joined the offered program. Among the 7,890 randomized, 74% (5,853) and 68% (5,370) responded to follow-ups at 6 m and 18 m, respectively. Effects were estimated by intention-to-treat (ITT) analyses and inverse probability weighted per-protocol (IPW-PP) analyses excluding adolescents who did not join the program. Mean (standard deviation (SD)) mini-HEI at baseline, 6 m and 18 m was -0.01 (0.64), 0.01 (0.59), and -0.01 (0.59), respectively. In ITT-analyses, no effects were observed, at any time point, in those who had received any SMS program compared to the non-SMS group, on BMI z-score (6 m: -0.010 [95% confidence interval (CI) -0.035, 0.015]; p = 0.442, 18 m: 0.002 [95% CI -0.029, 0.033]; p = 0.901) or mini-HEI (6 m: 0.016 [95% CI -0.011, 0.043]; p = 0.253, 18m: -0.016 [95% CI -0.045, 0.013]; p = 0.286). In IPW-PP analyses, at 6 m, a small decrease in BMI z-score (-0.030 [95% CI -0.057, -0.003]; p = 0.032) was observed, whereas no significant effect was observed in mini-HEI (0.027 [95% CI -0.002, 0.056]; p = 0.072), among those who had received any SMS program compared to the non-SMS group. At 18 m, no associations were observed (BMI z-score: -0.006 [95% CI -0.039, 0.027]; p = 0.724, and mini-HEI: -0.005 [95% CI -0.036, 0.026]; p = 0.755). The main limitations of the study were that DNBC participants, though derived from the general population, tend to have higher socioeconomic status than average, and that outcome measures were self-reported. In this study, a chatbot health education program delivered through an SMS program had no effect on dietary habits or weight trajectories in ITT analyses. However, IPW-PP-analyses, based on those 63% who had joined the offered SMS program, suggested modest improvements in weight development at 6 m, which had faded at 18 m. Future research should focus on developing gender-specific messaging programs including "booster" messages to obtain sustained engagement. ClinicalTrials.gov Identifier: NCT02809196 https://clinicaltrials.gov/study/NCT02809196.