We study the effects of urban environment on childhood obesity by concentrating on the effects of walking trails and crime close to children's homes on their BMI and obesity status. We use a unique dataset, which combines information on recreational trails in Indianapolis with data on violent crimes and anthropomorphic and diagnostic data from children's clinic visits between 1996 and 2005. We find that having a trail near a home reduces children's weight. However, the effect depends on the amount of nearby violent crimes. Significant reductions occur only in low crime areas and trails could have opposite effects on weight in high crime areas. These effects are primarily among boys, older children, and children who live in higher income neighborhoods. Evaluated at the mean length of trails this effect for older children in no crime areas would be a reduction of two pounds of the body weight. Falsification tests using planned trails instead of existing trails, show that trails are more likely to be located in areas with heavier children, suggesting that our results on effects of trails represent a lower bound.