In halide perovskite solar cells the formation of secondary-phase excess lead iodide (PbI2) has some positive effects on power conversion efficiency (PCE) but can be detrimental to device stability and lead to large hysteresis effects in voltage sweeps. We converted PbI2 into an inactive (PbI2)2RbCl compound by RbCl doping, which effectively stabilizes the perovskite phase. We obtained a certified PCE of 25.6% for FAPbI3 (FA, formamidinium) perovskite solar cells on the basis of this strategy. Devices retained 96% of their original PCE values after 1000 hours of shelf storage and 80% after 500 hours of thermal stability testing at 85°C.