Abstract Introduction We examined the association between mammographic density and single-nucleotide polymorphisms (SNPs) in genes encoding CYP1A1, CYP1B1, aromatase, 17β-HSD, ESR1, and ESR2 in pre- and early perimenopausal white, African-American, Chinese, and Japanese women. Methods The Study of Women's Health Across the Nation is a longitudinal community-based cohort study. We analyzed data from 451 pre- and early perimenopausal participants of the ancillary SWAN Mammographic Density study for whom we had complete information regarding mammographic density, genotypes, and covariates. With multivariate linear regression, we examined the relation between percentage mammographic breast density (outcome) and each SNP (primary predictor), adjusting for age, race/ethnicity, parity, cigarette smoking, and body mass index (BMI). Results After multivariate adjustment, the CYP1B1 rs162555 CC genotype was associated with a 9.4% higher mammographic density than the TC/TT genotype (P = 0.04). The CYP19A1 rs936306 TT genotype was associated with 6.2% lower mammographic density than the TC/CC genotype (P = 0.02). The positive association between CYP1A1 rs2606345 and mammographic density was significantly stronger among participants with BMI greater than 30 kg/m2 than among those with BMI less than 25 kg/m2 (Pinteraction = 0.05). Among white participants, the ESR1 rs2234693 CC genotype was associated with a 7.0% higher mammographic density than the CT/TT genotype (P = 0.01). Conclusions SNPs in certain genes encoding sex steroid metabolism enzymes and ESRs were associated with mammographic density. Because the encoded enzymes and ESR1 are expressed in breast tissue, these SNPs may influence breast cancer risk by altering mammographic density.