PN junction rectification is demonstrated in indium nitride. The junction is formed between the n-type surface accumulation layer and the Mg-doped, p-type bulk in a top-contacted thin film structure. The parasitic shorting path between the top contacts is controlled by gating with an electrolyte. For positive gate voltages, electrons accumulate at the surface and the current flows preferentially through n type regions, and linear current-voltage (I-V) behavior is observed. However, for negative gate voltages, surface electrons are depleted and current flows through the p-type bulk. This creates an n-p-n structure and a characteristic non-linear I-V curve is observed. [doi:10.1063/1.3634049]