Transparent AgI-CuI heterojunctions with high rectifying diode behavior were prepared via vapor-phase iodization of metal thin films on transparent conducting oxide substrates. At room temperature, Ag and Cu metal thin films were quickly transformed into the transparent and well-crystallized β-phase of AgI and the γ-phase of CuI, respectively. The AgI and CuI films exhibited n-type and p-type semiconductor properties, respectively, with wide band gaps. The heterojunctions were obtained by applying the CuI film to the AgI film in a sequential iodization process. AgI compounds generally have poor air-stability under light, making them suboptimal for use in electronic applications. Here, we used a CuI top layer to inhibit the photodecomposition of the AgI bottom layer, resulting in an air-stable and smooth AgI-CuI film. We also propose a simple patterning method for the AgI-CuI layer using selective decomposition of AgI without the need for lithography equipment or toxic chemicals. Although there is metal ion exchange between the two layers, each layer has a different chemical composition and crystal structure; therefore, the AgI-CuI heterojunction exhibits pn-diode behavior with a rectifying ratio of 9.4 × 10, which is comparable to that of other transparent pn-diodes. These findings open a new path for electronic application of AgI materials.