In order to minimize the huge loss caused by hydrogen explosion in confined space, experimental and numerical simulation methods were used to study the effects of the vent position and number on hydrogen/air explosion characteristics in a straight pipe with 7.2 m in the length and 125 mm in the inner diameter. The results showed that the continuous emission effect of the vent can provide an induction effect to the flame propagation before the flame reached the vent and produce a continuous disturbance to the flow field, which increased the flame instability. The vent position has a significant influence on the explosion venting effect. In the experiment, the explosion venting effect was the best when the vent was set near the ignition end. The maximum explosion overpressure and flame propagation velocity were reduced by 21.2 and 26.7%, respectively, compared with the pipe without vent. The explosion venting effect was slightly weak when the vent was in the back of the pipe. The reflected waves caused by the collision between the shock waves and the blind plate promoted the emission effect of the vent. When the vent was set in the middle of the pipe, the flame passed through the vent with a higher speed, which limited the emission effect of the vent and led to the worst explosion venting effect. Multistage pressure relief can effectively reduce the explosion intensity of hydrogen in the pipe. In the experiment, the maximum flame propagation velocity and explosion overpressure gradually decreased with the vent number increasing. When the vent number was three, the maximum explosion overpressure and flame propagation velocity decreased by 47.3 and 68.4%, respectively, compared with the pipe without vent. Therefore, properly increasing the vent number is beneficial to improve the explosion venting effect and ensures the safety of equipment.