ObjectiveUrinary tract infection (UTI) is assumed to be associated with the risk of fetal and maternal mortality and morbidity during pregnancy. The potential effect of health literacy and self-efficacy on UTI preventive behaviors among pregnant women has not yet been fully studied. Our objectives were to determine the level of health literacy, self-efficacy, and UTI prevention behaviors in pregnant women, and whether health literacy and self-efficacy are associated with UTI prevention behaviors in pregnant women.DesignA cross-sectional study was conducted, from November 2020 to December 2020, through a multi-stage sampling design on 235 pregnant women aged between 18 and 42 years in Mashhad, Iran. Data were collected through valid and reliable questionnaires including the Test of Functional Health Literacy in Adults (TOFHLA), General Self-Efficacy Questionnaire (GSE), and research made-preventive behaviors recommendations for UTI disease.ResultsThe level of UTI prevention behaviors scores is moderate (71.39 ± 8.58) among women during their pregnancy. Insufficient health literacy and self-efficacy were observed in 53.6% and 59.3% of participants, respectively. The regression model highlighted that 21.20% of the total variance of UTI preventive behaviors was predicted by sociodemographic characteristics, while 40.81% of the variance of UTI preventive behaviors was predicted by health literacy and self-efficacy.ConclusionIt has been observed that health literacy and self-efficacy are main determinants to improve UTI preventive behaviors. Focusing on an intervention based on health literacy skills may be a practical strategy to promote a healthy lifestyle in this population.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12905-023-02359-3.