A flexible self-charging system that can harvest energy from the ambient environment and simultaneously charge energy-storage devices without needing an external electrical power source would be a promising solution towardswireless wearable electronics, untethered soft robotics and the internet of things.