In this paper, the hazard criteria for thermal radiation and shock wave overpressure applicable to the deflagration of urban gas pipelines have been proposed. The phast software is used to analyze the hazard intensity and degree of pipeline deflagration. Based on the hazard criteria, the situation of personnel and object damage is determined, and targeted risk control points are proposed. The influence of the parameters of wind speed, atmospheric stability, air humidity, and operating pressure on the deflagration hazard is studied. The work presented in this paper can provide a reference for the disaster assessment and safety management of urban gas pipelines.