Abstract Study question What is the level of fertility knowledge, childbearing intentions, and attitudes toward parenthood among men and women who are about to get married in Iran? Summary answer The study revealed insufficient fertility knowledge, a strong desire for childbearing, and a positive attitude toward parenthood, along with significant gender disparities in fertility preferences. What is known already In recent years, declining birth rates in both developed and developing countries have raised concerns. The downward trend in fertility rates and delayed childbearing present significant global challenges related to aging populations, requiring an examination of contributing factors. Advances in reproductive technologies, evolving gender roles, and personal and professional aspirations have fundamentally reshaped attitudes towards fertility, influencing couples’ intentions to have children. A comprehensive understanding of individuals’ fertility knowledge and preferences regarding childbearing and parenting is essential to comprehend fertility behaviors and develop targeted interventions, family support systems, and policies aligned with their preferences. Study design, size, duration From June 2021 to March 2022, a web-based cross-sectional survey was conducted, involving 2938 soon-to-be-married individuals (1533 women and 1405 men). Participants/materials, setting, methods Women aged 18 to 35 years and men aged 18 to 45 years, with no history of prior marriages, who were referred to public health centers for the purpose of obtaining a marriage license, were included through stratified sampling in Iran’s five major cities (Tehran, Tabriz, Mashhad, Ahvaz, and Shiraz). The Cardiff Fertility Knowledge Scale (CFKS) and the Swedish Fertility Awareness Questionnaire were used for data collection. Main results and the role of chance The mean age among men and women was 28.86±5.44 and 24.61±5.99 years, respectively. The average CFKS score was 48.19% (0-100%) with no significant difference between males and females (48.08% vs 48.3%, p = 0.694). The study found that 86.6% of participants expressed an intention to have children in the future, significantly more prevalent among men compared to women (88.9% vs. 84.4%, p < 0.001). The desired family size was two children for 56.1% of participants, while 19.1% preferred one child. The intention of women to have the first and last child between the ages of 35 and 39 was 12.7% and 31%, respectively. Participants highly valued parenthood (7.76±2.90), and men valued parenthood significantly more compared to women (7.88 ±2.84 vs 7.64±2.96, p = 0.027). Participants viewed In Vitro Fertilization (IVF), adoption, and a child-free lifestyle as potential responses to infertility with respective ratings of 5.73±3.78, 4.04±3.63, and 3.99±3.63, respectively (range 0-10). No significant gender differences were observed (all p > 0.05). The study highlighted that maintaining a stable relationship was perceived as the most important factor influencing the decision to have children (4.54±1.05). Moreover, participants believed the most transformative aspects of parenthood were the giving and receiving of love (2.56±0.82). Limitations, reasons for caution Interpreting the results necessitates addressing limitations such as volunteer bias, urban area sampling, cross-sectional design limitations for causal relationships, and the potential influence of Covid-19 on fertility preferences. Therefore, caution is needed when generalizing findings to other populations. Wider implications of the findings The study’s findings have significant implications for policies promoting childbearing. To enhance fertility knowledge, promote informed reproductive decision-making, and facilitate consensus among couples regarding their fertility choices, it is recommended that midwives assume a crucial role in providing related services. These measures should be smoothly integrated into existing frameworks. Trial registration number Not applicable