UNDerwater EXplosions (UNDEXs) are widely used in many areas of applied engineering including oil production and warship protection. However, the three-dimensional computations of UNDEXs, especially for explosives with complex initial shapes are still lacking, which is mainly due to the difficulty in capturing the multi-medium interface with high pressure ratio. In this study, we conducted a series of three-dimensional numerical simulations of UNDEXs with different initial shapes of a high-pressure gas bubble surrounded with water, to investigate the dynamics of the explosion caused by the shape change of the gas bubble. The movement of the interface was traced with the level-set method, and the conditions at the gas–water interface were treated using the Real Ghost Fluid Method (RGFM). As a result, the temporal evolution of the pressure field during the explosion and the pressure exerted at the boundaries of the computational domain in each simulation scenario were obtained. It was found that an initial shock wave is generated by the explosion and transmitted in the water, leading to an increase of the pressure and density. Meanwhile, inside the gas bubble, a rarefaction wave is formed, causing a pressure drop of the explosive gas. The results also show that if the initial shape of the bubble filled with the explosive gas is simple (e.g., spherical, cylindrical, cuboidal), the peak pressure of the shock wave is dominated by the cross-sectional area of the initial bubble along each direction. In addition, the duration of the high pressure phase of the shock wave is dictated by the thickness of the bubble. Moreover, the simulation of a bubble with an initially bullet-like shape revealed that this specific shape enables a concentration of the energy in a well-defined direction. The peak of the pressure generated by the gas bubble of this more complex shape is approximately twice than that of the other scenarios. However, the high pressure was found to drop more rapidly than that of the other cases, which might be attributed to the comparably small thickness of the initial bubble.