ABSTRACT: Importance:Diet may play a role in testicular function, but data on how adherence to different diet patterns influences human testicular function are scarce. Objective:To determine whether adherence to specific dietary patterns is associated with testicular function in young men. Design, Setting, and Participants:This cross-sectional study included 2935 young Danish men unselected regarding fertility status who were enrolled from April 1, 2008, through May 31, 2017. Data were analyzed from July 1, 2017, to January 30, 2019. Exposures:Dietary patterns identified with principal component analysis based on responses to a validated food frequency questionnaire. Main Outcomes and Measures:Standard semen quality assessment; serum concentrations of testosterone, free testosterone, estradiol, inhibin B, follicle-stimulating hormone, luteinizing hormone, and sex hormone-binding globulin; and testicular volume measured with ultrasonography. Results:Among the 2935 participants included in the analysis, median age was 19 (interquartile range, 19-20) years and 2290 (78.0%) had normal body mass index. The 4 dietary patterns identified included Western, prudent, open-sandwich (a traditional Danish eating pattern), and vegetarianlike. The greatest adherence to the prudent pattern was associated with the highest total sperm count (median, 167 [95% CI, 146-183] million), followed by adherence to vegetarianlike (median, 151 [95% CI, 134-168] million) and open-sandwich (median, 146 [95% CI, 131-163] million) patterns. Adherence to the Western pattern was associated with the lowest total sperm count (median, 122 [95% CI, 109-138] million), which was significantly lower than sperm count in the other 3 diet patterns. After adjusting for confounders, the median total sperm count for men in the highest quintile of adherence to the Western pattern was 26 million lower (95% CI, -42 to -9 million) than for men in the lowest quintile of adherence to this pattern. Conversely, the median total sperm count of men in the highest quintile of adherence to the prudent pattern was 43 million (95% CI, 23-63 million) higher than that of men in the lowest quintile. Men with the highest adherence to the Western pattern had a lower median ratio of inhibin B to follicle-stimulating hormone (-12 [95% CI, -20 to -3]) and higher median ratio of free testosterone to luteinizing hormone (10 [95% CI, 2-19]) compared with men with lowest adherence to this pattern. Conclusions and Relevance:In this cross-sectional study, adherence to generally healthy diet patterns was associated with better semen quality, with potentially more favorable fertility potential among adult men.