We study experimentally the cratering process due to the explosion and collapse of a pressurized air cavity inside a sand bed. The process starts when the cavity breaks and the liberated air then rises through the overlying granular layer and produces a violent eruption; it depressurizes the cavity and, as the gas is released, the sand sinks under gravity, generating a crater. We find that the crater dimensions are totally determined by the cavity volume; the pressure does not affect the morphology because the air is expelled vertically during the eruption. In contrast with impact craters, the rim is flat and, regardless of the cavity shape, it evolves into a circle as the cavity depth increases or if the chamber is located deep enough inside the bed, which could explain why most of the subsidence craters observed in nature are circular. Moreover, for shallow spherical cavities, a collimated jet emerges from the collision of sand avalanches that converge concentrically at the bottom of the depression, revealing that collapse under gravity is the main mechanism driving the jet formation.