The formation of various types of kidney stones is strongly influenced by urinary pH. An alkaline pH favors the crystallization of calcium- and phosphate-containing stones, whereas and acidic urine pH promotes uric acid or cystine stones. The activity of many transport processes involved in calcium, citrate and phosphate handling are sensitive to changes in systemic or local pH as shown for several phosphate transporters, the citrate transporter NaDC1 and the TRPV5 calcium channel. Defects in urinary acidification (excretion of inappropriately alkaline or acidic urines, respectively) contribute to kidney stone disease. The low excretion of ammonium in patients with metabolic syndrome has been linked to more acidic urine and a higher incidence of uric acid stones. In this state, insulin resistance may reduce ammonium excretion by the proximal tubule. On the other hand, defensive mechanisms may protect from kidney stone formation in conditions such as hypercalciuria where high luminal calcium concentrations stimulate urinary acidification and reduce urinary concentration via a calcium-sensing receptor, resulting in the excretion of acidic and diluted urine. This review will discuss a few aspects that relate to the capacity of the kidney to regulate pH and its impact on the excretion of solutes that participate in the formation or prevention of stones.