BackgroundKidney stone disease (KSD) is a common condition that affects 10% population in the United States (US). The relationship between thiamine and riboflavin intake and KSD has not been well-studied. We aimed to investigate the prevalence of KSD and the association between dietary thiamine and riboflavin intake with KSD in the US population.MethodsThis large-scale, cross-sectional study included subjects from the National Health and Nutrition Examination Survey (NHANES) 2007–2018. KSD and dietary intake were collected from questionnaires and 24-hour recall interviews. Logistic regression and sensitivity analyses were performed to investigate the association.ResultsThis study included 26,786 adult participants with a mean age of 50.12 ± 17.61 years old. The prevalence of KSD was 9.62%. After adjusting for all potential covariates, we found that higher riboflavin intake was negatively related to KSD compared with dietary intake of riboflavin < 2 mg/day in the fully-adjusted model (OR = 0.541, 95% CI = 0.368 to 0.795,P= 0.002). After stratifying by gender and age, we found that the impact of riboflavin on KSD still existed in all age subgroups (P< 0.05) but only in males (P= 0.001). No such associations were found between dietary intake of thiamine and KSD in any of the subgroups.ConclusionsOur study suggested that a high intake of riboflavin is independently inversely associated with kidney stones, especially in male population. No association was found between dietary intake of thiamine and KSD. Further studies are needed to confirm our results and explore the causal relationships.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12889-023-15817-2.