Infertility is a significant reproductive health problem that affects individuals and couples worldwide. Low public awareness regarding lifestyle-related infertility risk factors may lead to delays in prevention efforts and seeking healthcare services. This study aimed to evaluate the effectiveness of a lifestyle education intervention delivered through an e-book in improving knowledge regarding infertility risk factors among reproductive-age individuals in Bantul Regency. This study employed a quasi-experimental design with a one-group pretest–posttest approach involving 102 male and female respondents aged 18–45 years from the general population recruited using a convenience sampling technique. Respondents completed a validated knowledge questionnaire consisting of 20 items before and after receiving the educational intervention. The intervention consisted of an e-book containing information about infertility, its risk factors, and healthy lifestyle practices that support reproductive health. Data were analyzed using descriptive statistics and paired t-test analysis to assess differences in knowledge scores before and after the intervention. The results showed that the mean knowledge score increased significantly from 11.28 ± 3.14 during the pretest to 16.74 ± 2.41 during the posttest (p < 0.001). Item-level analysis also demonstrated an increased proportion of correct responses, particularly regarding modifiable lifestyle factors such as smoking, obesity, alcohol consumption, and physical activity. These findings indicate that lifestyle education delivered through digital media is effective in improving knowledge regarding infertility risk factors among reproductive-age communities. The integration of digital health education into reproductive health promotion programs has the potential to increase public awareness and support infertility prevention efforts.