Approximately 80% of all crystals are composed predominantly of calcium compounds. The most common cause of crystal production is excess calcium in the urine (hypercalciuria). Extra calcium is normally removed from the blood by the kidneys and excreted in the urine. In hypercalciuria, excess calcium builds up in the kidneys and urine, where it combines with other waste products to form calcium oxalate crystals. Low levels of urinary citrate, magnesium and high levels of oxalate and sodium along with inadequate urinary volume contribute to calcium oxalate crystal formation. Calcium oxalate crystals are composed of calcium that is chemically bound to oxalate (calcium oxalate) or phosphate (calcium phosphate). Of these, calcium oxalate is much more common. The less common calcium phosphate crystals typically occur in patients with metabolic or hormonal disorders such as hyperparathyroidism and renal tubular acidosis. Increased intestinal absorption of calcium (absorptive hypercalciuria), excessive hormone levels (hyperparathyroidism, hypervitaminosis D), and renal calcium leak (kidney defect that causes excessive calcium to enter the urine) can all cause hypercalciuria. Prolonged inactivity also increases urinary calcium and may cause calcium oxalate crystals. (This is why astronauts in space tend to lose bone mass and form calcium oxalate crystals.) Renal tubular acidosis (inherited condition in which the kidneys are unable to excrete acid) significantly reduces urinary citrate (a natural urinary antacid) as well as total urinary acid levels and can lead to crystal formation, usually calcium phosphate crystals. Substances exist normally in urine that can prevent calcium oxalate crystals from developing. Magnesium, citrate, pyrophosphate and other enzymes all act in the body as a deterrent to crystals forming and attaching to the surface of kidney tubes. Having too little of these substances present in urine can trigger calcium oxalate crystals. Certain medications such as calcium-containing antacids, loop diuretics and glucocorticoids can increase calcium secretion into the urine. Too much vitamin D can also lead to increased calcium. Hyperparathyroidism occurs when too much parathyroid hormone is produced by the body, causing calcium to be pulled from the bones into the blood and subsequently into the urine. This helps to explain the association between calcium oxalate crystals and low bone density. Kidney disease can cause high calcium levels in the urine when calcium is not properly absorbed back into the bloodstream. High blood pressure and obesity have also been associated with hypercalciuria. Some people are born with a genetic tendency to secrete excess oxalate into the urine. This condition, hyperoxaluria, is rare; most cases of hyperoxaluria arise from other causes. For one, diets rich in oxalate may place someone at risk for calcium oxalate crystals. Oxalate-rich foods include beets, chocolate, nuts, rhubarb, spinach, strawberries, tea and wheat bran. Excessive amounts of vitamin C can also increase oxalate levels, as can inflammatory bowel disease. High amounts of dietary protein can lead to increases in both calcium and oxalate levels in the urine. The elevated protein results in lower urine pH — an acidic environment that makes it easier for calcium oxalate crystals to form. It also decreases citrate levels in the urine that help prevent calcium oxalate crystals from forming. The risks of crystal formation can often be minimized by paying close attention to diet and good hydration.