Urolithiasis, a prevalent chronic kidney disease affecting all age groups, can be influenced by nutritional factors. The incidence of urolithiasis in Asian countries ranges from 1% to 19.1%, attributed to geographical and lifestyle differences. In Iran, several risk factors, including ethnicity, dietary habits, gender, and age, are associated with urolithiasis. This study aimed to assess the impact of nutritional factors on kidney and urinary tract stone formation. This case-control study enrolled 127 newly diagnosed urolithiasis patients, and 127 matched healthy participants between February to May 2017. Exclusion criteria included diabetes and acute or chronic renal failure. Data were collected using the Food Frequency Questionnaire (FFQ) and analyzed using chi-square and logistic regression tests. Water (95% CI: 0.09-0.89, OR=0.28), natural juices (95% CI: 0.10-0.65, OR=0.53), mineral water (95% CI: 0.05-0.64, OR=0.18), legumes (95% CI: 0.00-0.38, OR=0.032), butter, cream, or peppermint (95% CI: 0.09-0.95, OR=0.30), and ice cream (95% CI: 0.07-0.54, OR=0.203) had a significant protective effect against kidney and urinary tract stone formation. Conversely, tea consumption (95% CI: 1.15-7.99, OR=4.70), beverages (95% CI: 4.45-23.32, OR=23.32), coffee (95% CI: 1.63-11.78, OR=4.39), bread (95% CI: 1.1-10.59, OR=3.37), meat (95% CI: 1.01-8.01, OR=2.85), liver (95% CI: 3.37-488.90, OR=40.58), fish (95% CI: 2.89-216.39, OR=25.03), and various canned foods (95% CI: 1.34-10.25, OR=3.70) were significantly associated with kidney and urinary tract stone risk. These findings showed that the risk of urinary stones formation had a significant relationship with dietary habits. Therefore, the correct dietary pattern and sufficient fluid consumption may play an important role in preventing urinary stones.