Non-radiative recombination loss at the hole transport layer (HTL)/perovskite interface in the narrow-bandgap subcell constrains the power conversion efficiency (PCE) of all-perovskite tandem solar cells1,2. Minimizing charge recombination at the buried interface of lead–tin (Pb–Sn)-based narrow-bandgap perovskite solar cells has proven to be particularly challenging, as conventional long-chain amine-based passivation strategies often induce carrier transport losses, thereby limiting both the fill factor and the short-circuit current density (Jsc)3–5. Here we developed a dipolar-passivation strategy that reduces the trap density at the buried interface of mixed Pb–Sn perovskite while simultaneously enabling precise energy-level alignment at the HTL/perovskite interface. This dipolar-induced passivation enhances ohmic contact, facilitating efficient hole injection into the HTL and repelling electrons from the HTL/Pb–Sn perovskite interface. This approach extends the carrier diffusion length to 6.2 μm and enables a substantial enhancement in the PCE of Pb–Sn perovskite solar cells, achieving 24.9% along with an open-circuit voltage (Voc) of 0.911 V, a Jsc of 33.1 mA cm−2 and a high fill factor of 82.6%. Furthermore, the dipolar passivation effectively mitigates contact losses in the narrow-bandgap subcell induced by the interconnecting layer of tandem devices, contributing to an outstanding PCE of 30.6% (certified stabilized 30.1%) in all-perovskite tandem solar cells.