Objective To investigate the causal relationship between the relative intake of dietary components(including carbohydrate,added sugar,protein,and fat)and kidney stones using two sample Mendelian randomization(MR).Methods The genetic instrumental variables(IVs)from genome-wide association study(GWAS)statistics,exposure-related summary data from the SSGAC genome study,and kidney stone data from the Finn Gen Consortium were collected,which were then analyzed with inverse variance weighting(I VW).The MR results and sensitivity were assessed with MR-Egger,weighted median,MR-PRESSO test,Cochran's Q test,leave-one analysis,and Steiger filter.Results IVW results showed that the relative intake of carbohydrate(OR=2.01,95%CI:1.02-3.96,P=0.042)and added sugar(OR=2.07,95%CI:1.00-4.29,P=0.049)had a causal relationship and were risk factors for the development of kidney stones.Relative intake of protein(OR=0.70,95%CI:0.38-1.29,P=0.249)and fat(OR=0.79,95%CI:0.27-2.35,P=0.671)were not associated with kidney stones.Sensitivity analysis showed no heterogeneity or pleiotropy(P>0.05).Conclusion Relative intake of carbohydrate and added sugar are risk factors for kidney stones,suggesting that limiting carbohydrate and added sugar intake may prevent the development of kidney stones.