BackgroundTobacco use and secondhand smoke (SHS) are risk factors of kidney stone disease (KSD). The hypothesis is that tobacco produces chemicals that increase oxidative stress and vasopressin, which leads to decreased urine output, and contributes to stone formation. The aim of this study was to examine the effects of smoking and SHS on the development of KSD.Materials and methodsWe analyzed a total of 25,256 volunteers with no history of KSD participated in the Taiwan Biobank. The presence of underlying and follow-up KSD was surveyed by a self-administrated questionnaire. They were classified into three groups on the basis of smoking and SHS exposure, accessed with survey questionnaires; never-smokers with no SHS exposure, never-smokers with SHS exposure and ever-smokers groups.ResultsKSD was noted in 352 (2.0%), 50 (3.3%) and 240 (4.1%) subjects in the never-smokers with no SHS exposure, never-smokers with SHS exposure and ever-smokers groups, respectively, with a mean follow-up of 4 years. The odds ratio (OR) of KSD was higher in the never-smokers with SHS exposure (OR, 1.622; 95% confidence interval [95% CI], 1.225 to 2.255) and ever-smokers groups (OR, 1.282; 95% CI, 1.044 to 1.574) than in the never-smokers with no SHS exposure group after adjustment of confounders. In addition, never-smokers with SHS exposure had similar effects on the development of KSD than ever-smokers (OR, 1.223; 95% CI, 0.852 to 1.756).ConclusionOur study suggests that both smoking and SHS are a risk factor for developing KSD and that the impact of SHS is not inferior to that of smoking.Trial registrationThe study was conducted in accordance with the Declaration of Helsinki and approved by the Institutional Review Board of Kaohsiung Medical University Hospital (KMUHIRB-E(I)-20,210,058).Supplementary InformationThe online version contains supplementary material available at 10.1186/s12889-023-16116-6.