To understand the influence of roadway space characteristics on gas explosions, the gas explosion CFD code was used to establish full-scale models, and the effect of roadway length and section shape on gas explosion overpressures were studied. The results show that in straight roadways with the same section, the same premixed gas produces the same initial overpressure, and the overpressure attenuation is also the same before approaching the exit. A method is proposed to characterize the aspect ratio deviation of different roadway section shapes. It is found that the squarer the roadway section shape is, the lower the overpressure generated by high intensity explosion. The cross-sectional area and shape of roadway determine the ultimate overpressure. The research shows that reducing the friction coefficient and section constraint of roadway is helpful to weaken the overpressure near the source of gas explosion, thus reducing the disaster intensity.