A simple yet general swelling–deswelling microencapsulation strategy has been developed to achieve well dispersed and intimately passivated crystalline organic–inorganic perovskites nanoparticles within polymer matrixes and results in a series of highly luminescent CH3NH3PbBr3 (MAPbBr3)–polymer composite films with unprecedented water and thermal stabilities and superior color purity.