Perovskite solar cells (PSCs) are developing rapidly in recent years, showing remarkable power conversion efficiency (PCE) of 25 %, which is comparable to crystalline silicon solar cells. However, since perovskite and other functional layers are very sensitive to the environment with high humidity, illumination, and heat, PSCs meet great challenges in device stability, which significantly limit their industrialization and commercialization. Encapsulation has become an effective strategy to enhance the stability of PSCs, and various encapsulation techniques have been developed, such as atomic layer deposition and glassglass technology. Most of the current encapsulating methods are either time-consuming and sophisticated processes, or exhibit rigid configuration, which is unsuitable for flexible and curved devices. Here, an ambient spray coating method was developed to fabricate organic-inorganic composite film for direct encapsulation of PSCs. By systematical optimization of the film composition, thickness, and microstructures, a superhydrophobic encapsulating thin film with high compactness and homogeneity was achieved. As a result, the hybrid encapsulating film with polystyrene (PS)-4033/PS-4033-SiO 2 significantly improved the stability of PSCs in humid environment (60-70 % relative humidity, 35 °C) by showing about 10 times longer lifetime than that of the unencapsulated devices, which was mainly attributed to complementary effects from the high compactness of PS and high hydrophobicity of SiO 2 . This work suggests that direct deposition of organicinorganic composite on devices as encapsulating films is an efficient strategy to enhance the device stability, and this method shows great promises of application in flexible and large-area devices.