Urinary tract infection (UTI) is usually an ascending infection caused by bacteria derived from stools. Since the bacterial composition of stools is dependent on the diet, it is likely that the risk of UTI will change with changes in the diet. Most data describing diet as a risk factor for UTI come from epidemiological and interventional trials. It has been shown in a case-control setting that frequent consumption of fresh berry or fruit juices and fermented milk products containing probiotic bacteria decreases the risk for UTI recurrence in women. Several interventional trials have found Vaccinium berry products to provide protection from UTI recurrence. Probiotics have not been able to prevent UTI in interventional trials. However, the lack of an effect may be related to too low a dose or to the use of non-optimal products in these trials. Limited data are available on the effects of nutrition on UTI in children. However, there is no reason to expect that children would be different from adults in this respect. In this review, we discuss the dietary factors affecting the susceptibility to UTI.