Organic-inorganic hybrid perovskites are particularly suited as light-harvesting materials in photovoltaic devices. The power conversion effciency of perovskite solar cells has reached certified values of over 20% in just a few years. However, one of the major hindrances for application of these materials in real-world devices is the performance degradation in humid conditions, leading to a rapid loss of photovoltaic response. Here, we demonstrate that hydrophobic tertiary and quaternary alkyl ammonium cations can be successfully assembled on the perovskite surface as effcient water-resisting layers via a facile surface functionalization technique. Such layers can protect the perovskite film under high relative humidity (90 ± 5%) over 30 days. More importantly, devices based on such films can retain the photovoltaic capacities of bulk perovskites, with power conversion effciencies over 15%. Improving the humidity tolerance of perovskite materials is a necessary step towards large-scale production of high-performance perovskite-based devices under ambient humidity.