Lead in perovskite solar cells is a potential environmental and health hazard if it is released from accidentally damaged panels. Now, the encapsulation of perovskite solar cells with self-healing polymers is shown to significantly reduce the risk of lead leakage from hail impact under a variety of weather conditions.