Perovskite solar cells, as an emerging high-efficiency and low-cost photovoltaic technology1-6, face obstacles on their way towards commercialization. Substantial improvements have been made to device stability7-10, but potential issues with lead toxicity and leaching from devices remain relatively unexplored11-16. The potential for lead leakage could be perceived as an environmental and public health risk when using perovskite solar cells in building-integrated photovoltaics17-23. Here we present a chemical approach for on-device sequestration of more than 96 per cent of lead leakage caused by severe device damage. A coating of lead-absorbing material is applied to the front and back sides of the device stack. On the glass side of the front transparent conducting electrode, we use a transparent lead-absorbing molecular film containing phosphonic acid groups that bind strongly to lead. On the back (metal) electrode side, we place a polymer film blended with lead-chelating agents between the metal electrode and a standard photovoltaic packing film. The lead-absorbing films on both sides swell to absorb the lead, rather than dissolve, when subjected to water soaking, thus retaining structural integrity for easy collection of lead after damage.