In order to develop a portable flash x-ray source, a compact explosive pulsed power source based on an explosive-driven ferroelectric generator (EDFEG) is investigated numerically and experimentally in this paper. The EDFEG is used as a primary power supply to charge a pulse capacitor, and then the capacitor outputs high current through an inductor and an electrical exploding opening switch (EEOS). Finally, a high voltage fast pulse is generated on a diode, which generates x rays. A circuit model was built to analyze the performance of this compact pulsed power source. A portable flash x-ray generator prototype was constructed in our laboratory. The typical experimental results illustrated that after metal wires of the EEOS exploded, a high-voltage fast pulse with a peak value of 180kV, a rise time of 2.8ns, and a pulse width of 30ns was generated on the x-ray diode. Meanwhile, an x-ray pulse with a pulse width of 19ns, a focus of about 1mm, and a dose of 100 mR at 15cm was obtained.