BackgroundCoffee is one of the most consumed beverages worldwide, but the effects on the thyroid are unknown. This study aims to examine the association between coffee and thyroid function.MethodsParticipant data (≥ 20 years, n = 6578) for the observational study were obtained from NHANES 2007-2012. Analysis was performed using weighted linear regression models and multiple logistic regression models. Genetic datasets for Hyperthyroidism and Hypothyroidism were obtained from the IEU database and contained 462,933 European samples. Mendelian randomization (MR) was used for the analysis, inverse variance weighting (IVW) was the main method of analysis.ResultsIn the model adjusted for other covariates, participants who drank 2-4 cups of coffee per day had significantly lower TSH concentrations compared to non-coffee drinkers (b=-0.23, 95% CI: -0.30, -0.16), but no statistically significant changes in TT4, FT4, TT3 and FT3. In addition, participants who drank <2 cups of coffee per day showed a low risk of developing subclinical hypothyroidism. (OR=0.60, 95% CI: 0.41, 0.88) Observational studies and MR studies have demonstrated both that coffee consumption has no effect on the risk of hyperthyroidism and hypothyroidism.ConclusionsOur study showed that drinking <2 cups of coffee per day reduced the risk of subclinical hypothyroidism and drinking 2-4 cups of coffee reduced serum TSH concentrations. In addition, coffee consumption was not associated with the risk of hyperthyroidism and hypothyroidism.