The performance of inorganic, wide-bandgap perovskite solar cells is hindered by unsuitable electron transport layers. Han et al. design an acidic magnesium-doped tin oxide quantum dot layer, improving efficiency and stability in single-junction and tandem cells.