In this work, we propose lateral p–n junction self-powered ultraviolet photodiodes using lateral polarity structure GaN (LPS-GaN) films. The design of the proposed photodiode is inspired by the recent demonstrations of obtaining laterally varying doping profiles by controlling the incorporation of donor and acceptor impurities in LPS-GaN. The proposed photodiodes provide a larger area for light absorption near the surface, and at the same time provide a large photocurrent even at zero external bias voltage, thanks to the electric field distribution of the lateral p–n junction. Through technology computer-aided design simulations and semi-analytical calculations, we show that the proposed photodiodes outperform the traditionally popular metal–semiconductor–metal (MSM) GaN photodiodes. The results shown in this study hold promise for realizing solar-blind photodetectors using polar GaN and AlGaN films. © 2023, The Minerals, Metals & Materials Society.