A passivation mechanism exploiting surface dipoles affords high-performance perovskite solar cells.