Halide perovskites are promising semiconductor materials for solutionprocessed optoelectronic devices. Their strong ionic bonding nature results in highly dynamic crystal lattices, inherently allowing rapid ion exchange at the solid-vapor and solid-liquid interface. Here, we show that the anion-exchange chemistry can be precisely controlled in single-crystalline halide perovskite nanomaterials when combined with nanofabrication techniques. We demonstrate spatially resolved multicolor CsPbX 3 (X = Cl, Br, I, or alloy of two halides) nanowire heterojunctions with a pixel size down to 500 nm with the photoluminescence tunable over the entire visible spectrum. In addition, the heterojunctions show distinct electronic states across the interface, as revealed by Kelvin probe force microscopy. These perovskite heterojunctions represent key building blocks for high-resolution multicolor displays beyond current state-of-the-art technology as well as high-density diode/transistor arrays.nanowire | halide perovskite | anion exchange | heterojunction S ignificant research efforts are currently directed toward lead halide-based perovskites, owing to their unusual optoelectronic and photovoltaic properties (1-5). In addition to polycrystalline thin films, various solution-based synthetic routes toward low-dimensional nanostructures of halide perovskites have been recently demonstrated, with control over size, shape, mixed halide composition, and consequently their band gap and emission wavelength (6-10). Interestingly, it has been shown that these materials, both in bulk and in nanocrystalline form, can undergo fast anion-exchange reactions at the solid-liquid or solid-gas interface, with a fine-tuning of the chemical composition and electronic properties (11)(12)(13)(14). The fast ion-exchange kinetics in halide perovskite are related to the low defect formation energy and the existence of a large number of vacancies, which make the ions highly mobile in the crystal lattice (15). As a result, the anionexchange reaction in halide perovskites favors forming homogeneous alloys instead of any kind of heterostructures as commonly observed in II-VI semiconductor compounds. If the exchange reaction can be localized at particular positions, then it is possible to produce substrates with well-defined patterns of semiconductor heterojunctions (16)(17)(18)(19)(20). The physical properties (optical, electrical, magnetic, etc.) of the heterostructure are fundamentally interesting, and the patterned semiconductor heterojunctions are essential for the fabrication of large-scale high-density integrated electronic and photonic devices.Compared with perovskite polycrystalline thin films and quantum dots, single-crystalline nanowires provide an ideal platform for producing and studying heterojunctions via ion-exchange chemistry because of the absence of grain boundaries and the unique one-dimensional geometry (21-24). The relatively thin diameter of the nanowire ensures rapid ion exchange in the radial direction, whereas the micrometer scale l...