Initial research indicates a possible connection between exposure to phthalates and the development of anemia. To fill the gap in epidemiological data, our study utilized data from across the United States, representative on a national scale, to evaluate the association between the concentration of phthalate metabolites in urine and both anemia and iron levels. We gathered data on 11,406 individuals from the National Health and Nutrition Examination Survey (NHANES) database, spanning 2003–2018. We conducted logistic and linear regression analyses, adjusted for potential confounding factors, to evaluate the correlations between different phthalate metabolites and anemia, as well as serum iron levels, including gender-stratified analysis. Most urinary phthalate metabolites were positively correlated with an increased risk of anemia, and the majority were negatively correlated with serum iron levels. The study revealed that for every unit increase in ln-transformed metabolite concentrations, the odds ratios (ORs) for anemia increased to varying degrees, depending on the phthalate: Monobutyl phthalate (MBP) at 1.08 (95% CI 1.01–1.17, P = 0.0314), mono(3-carboxypropyl) phthalate (MCPP) at 1.17 (95% CI 1.10–1.24, P < 0.0001), mono(2-ethyl-5-hydroxyhexyl) phthalate (MEHHP) at 1.08 (95% CI 1.02–1.15, P = 0.0153), mono(2-ethyl-5-oxohexyl) phthalate (MEOHP) at 1.14 (95% CI 1.07–1.21, P < 0.0001), mono(2-ethyl-5-carboxypentyl) phthalate (MECPP) at 1.11 (95% CI 1.03–1.18, P = 0.0030), monocarboxynonyl phthalate (MCNP) at 1.11 (95% CI 1.03–1.19, p = 0.0050), and monocarboxyoctyl phthalate (MCOP) at 1.13 (95% CI 1.07–1.19, P < 0.0001). Increased levels of MBP, MEHP, MBzP, MCPP, MEHHP, MEOHP, MIBP, MECPP, MCNP, and MCOP were linked with changes in serum iron levels, ranging from − 0.99 µg/dL (95% CI − 1.69 to − 0.29) to − 3.72 µg/dL (95% CI − 4.32 to − 3.11). Mixed-exposure analysis shows consistency with single-exposure model. Further mediation analysis showed that the association between single urinary phthalates and the risk of anemia was mediated by serum iron with a mediation ratio of 24.34–95.48% (P < 0.05). The presence of phthalate metabolites in urine shows a positive correlation with the prevalence of anemia, which was possibly and partly mediated by iron metabolism. Nonetheless, to confirm a definitive causal link and comprehend the underlying mechanisms of how phthalate exposure influences anemia, additional longitudinal and experimental research is required.