During pregnancy, stunting is highly susceptible due to insufficient nutritional intake, poor eating habits, and low-quality nutrient levels, which can result in impaired fetal growth. Lack of knowledge leads to a lack of understanding among the community about the importance of consuming adequate nutrition on a daily basis. The research method used in this study was quasi-experimental with pre-test and post- test control group design. The study was conducted in the Walantaka Community Health Center's working area in July 2023. The sample of this study consisted of pregnant women with physiological pregnancy criteria, who owned an Android phone and internet quota.. The data analysis used univariate and bivariate analysis. The results showed that gestational age (p-0.025) had an influence on the knowledge of pregnant women in preventing stunting during their pregnancy. The same applies to the parity of pregnant women (p-0.000), In both groups (E-Book and Leaflet), there was an increase in the average knowledge score, from 65.00 to 90.00 for the experimental group (e-book) and from 77.00 to 80.00 for the control group (leaflet) after the intervention. The increase in the average knowledge score was higher (22.81) in the E-Book group compared to the increase in the average knowledge score in the Leaflet group (control), which was only 7.50. The conclusion of this study indicates that both media can improve the knowledge of pregnant women in preventing stunting. However, statistically, e-books are more effective than leaflets in improving the knowledge and attitude of pregnant women in preventing stunting. Therefore, e-books can be considered the primary media for providing education to pregnant women in stunting prevention.