The growing use of focused lasers or electric sparks to generate cavitation bubbles raises concerns about the possible alteration of gas content during the initiation process and its effect on bubble dynamics. We provide experimental evidence that hydrogen molecules are produced for such plasma-induced bubbles. We performed spectral analysis of the light emitted by the plasma and monitored the dissolved hydrogen concentration in water. The mass of dissolved hydrogen was found proportional to the potential energy of the rebound bubble for both laser and spark methods. Nevertheless, hydrogen concentration was found 2.7 times larger with the spark.