Two‐dimensional perovskite solar cells (PSCs) with high moisture resistance are a key topic in the photovoltaic field. However, their lower power conversion efficiencies (PCEs) in comparison to 3 D PSCs is still an urgent problem to be solved. It is vital to understand the impact of constituent ratios and ammonium salt sizes on the photovoltaic performance and humidity stability. Based on the formula of (RNH3)2(MA)n−1PbnI3n+1 (n=1, 3, 5, 7, 9, and 11), a series of 2 D perovskites is prepared by introducing varisized ammonium salts of ethylammonium iodide (EAI), propylammonium iodide (PAI), and butylammonium iodide (BAI). The effects of the constituent ratios and varisized ammonium salts on the properties of the 2 D perovskites were studied. 2 D perovskite devices based on larger n and smaller ammonium salt size are found to exhibit better performances. However, the moisture resistance of the 2 D perovskite devices is higher when n is smaller and the ammonium salt size is larger. Therefore, the EA2MA10Pb11I34 (n=11) 2 D perovskite device displays the best photovoltaic performance, with the highest PCE of 16.93 %, whereas BA2MA2Pb3I10 (n=3) 2 D perovskite, with the largest contact angle of 79.8°, can retain over 85 % of the initial PCE after 1440 h aging at 50 % relative humidity. This work indicates the PCE and stability of 2 D perovskites can be conveniently and effectively adjusted by controlling the 2 D constituent ratios and ammonium salt sizes, so as to obtain efficient 2 D PSCs with high stability.