Using smartphones during a task that requires an upright posture can be detrimental for the overall motor performance. The aim of this study was to determine the risks of accidents caused by the use of smartphones by pedestrians while walking in a controlled (laboratory) and a non-controlled (public street) environment. Two hundred and one participants, 100 men and 101 women, all young adults, were submitted to walking activities while texting messages and talking on the phone. The risk of accident was measured by the time and the number of steps necessary to walk a 20 ft distance. Assessments were performed with no external distractors (laboratory) and on a public street with vehicles, pedestrians, lights, and noises. Multivariate analysis of variance tests provided the main effect of task (using × not using smartphone), environment (laboratory × street), sex (men × women), and interactions. Significance was set at 5%. The results showed that using a smartphone while walking demanded a greater number of steps and time to perform the task (main effect of task: 0.84; p = 0.001). The risk of accident was higher on the streets where, due to traffic hazards, pedestrians performed the task faster and with a lower number of steps (the main effect of environment: 0.82; p = 0.001). There was no difference of risks between men and women (main effect of sex: 0.01; p = 0.225), whether in the laboratory or on the street (main effect of sex × environment: 0.01; p = 0.905). The task × environment interaction showed that using a smartphone on the street potentiates risks of accidents of pedestrians (main effect of task × environment: 0.41; p = 0.001). In conclusion, using a smartphone while walking can be risky for pedestrians, especially in a traffic environment. People should avoid using their smartphone while crossing streets.