Estrogen exposure influences breast and endometrial cancer risk. The HSD17B1 gene produces an enzyme that catalyzes the conversion of estrone to estradiol. We hypothesized that genetic variations in HSD17B1 gene may alter endogenous estrogen levels and, thus, influence endometrial and breast cancer risk. We validated and genotyped polymorphisms in the HSD17B1 gene and assessed whether these single nucleotide polymorphisms (SNPs), or the imputed haplotypes, were associated with endometrial and breast cancer risk. We also assessed whether a priori risk factors modified the associations between HSD17B1 genotype and cancer risk, and whether HSD17B1 genotypes were associated with plasma estrogen levels among postmenopausal women not using hormone replacement therapy. Ten SNPs of HSD17B1 gene were validated in 30 women from the Nurses' Health Study. Using the expectation maximization algorithm, three common (>5% frequency) haplotypes accounted for 97% of the chromosomes at this locus, and seven SNPs were in complete linkage disequilibrium. We identified and genotyped two haplotype-tagging SNPs (+1004C/T and +1322C/A), and genotyped an additional SNP [+1954A/G (Ser312Gly)] in nested case-control studies of endometrial cancer (cases = 222, controls = 666) and breast cancer (cases = 1007, controls = 1441) in the prospective Nurses' Health Study. Although no overall association by SNP or haplotype analysis was observed with endometrial or breast cancer risk, the +1954A/A genotype was associated with higher estradiol levels in lean women (P = 0.01) and interaction between the +1954 genotype with body mass index in postmenopausal breast cancer (P = 0.05) was suggested. These findings suggest that the HSD17B1 may be associated with circulating estradiol levels and interact with body mass index in postmenopausal breast cancer.