Low-dimensional perovskites have gained increasing attention recently, and engineering their material phases, structural patterning and interfacial properties is crucial for future perovskite-based applications. Here a phase and heterostructure engineering on ultrathin perovskites, through the reversible cation exchange of hybrid perovskites and efficient surface functionalization of low-dimensional materials, is demonstrated. Using PbI2 as precursor and template, perovskite nanosheets of varying thickness and hexagonal shape on diverse substrates is obtained. Multiple phases, such as PbI2, MAPbI3 and FAPbI3, can be flexibly designed and transformed as a single nanosheet. A perovskite nanosheet can be patterned using masks made of 2D materials, fabricating lateral heterostructures of perovskite and PbI2. Perovskite-based vertical heterostructures show strong interfacial coupling with 2D materials. As a demonstration, monolayer MoS2/MAPbI3 stacks give a type-II heterojunction. The ability to combine the optically efficient perovskites with versatile 2D materials creates possibilities for new designs and functionalities.