With the rapid development of Internet of Things technology, the huge network connected by sensors has blend into every corner of the society. Exploring an appropriate power source to drive these sensors is an essential demand. Piezoelectric nanogenerators (PENGs) is considered as a promising approach, which can be employed to convert mechanical energy generated by small-scale physical deformation into electrical output. Herein, we proposed a flexible PENG based on sponge-shaped piezoelectric composite. The open-circuit voltage, short-circuit current and power density of the developed device achieved 33 V, 0.7 µA and 3 mW m −2 , respectively. This PENG successfully charged a 10 µF capacitor to 1.8 V in 280 s under the condition that the vibrator applies a continuous compressive force. In addition, experimental measurements to evaluate its actual output performance were well carried out. Resulting from its porous properties, this sponge-shaped PENG possesses higher flexibility and higher output capacity, which provides a promising potential in a variety of applications including energy harvesting and self-powered sensing.