This study numerically investigated the bubble dynamics in electrohydraulic (EH) and electromagnetic (EM) shock wave lithotripsy (SWL). The acoustic pressure generated by a typical EH (i.e., Dornier HM-3) and EM (i.e., Siemens Modularis) lithotripters has been measured. The dynamics of cavitation bubbles in SWL has been numerically simulated using the Gilemore formulation coupled with zero-order gas diffusion. The pressure measurement results showed that both the peak positive and negative pressure of the Modularis at E4.0 are slightly higher than the corresponding values of the HM-3 at 20 kV. However, the pressure waveforms generated by an EH lithotripter is different from these of an EM lithotripter. The EM shock wave has a remarkable 2nd compressive pulse, which might suppress the cavitation activities in the EM lithotripter. In addition, the numerical simulation showed the EH lithotripter could produce stronger cavitation activities than the EM lithotripter.