Making use of Kelvin probe force microscopy, in dark and under ultraviolet illumination, we study the characteristics of p-n junctions formed along the axis of self-organized GaN nanowires (NWs).We map the contact potential difference of the single NW p-n junctions to locate the space charge region and directly measure the depletion width and the junction voltage. Simulations indicate a shrinkage of the built-in potential for NWs with small diameter due to surface band bending, in qualitative agreement with the measurements. The photovoltage of the NW/substrate contact is studied by analysing the response of NW segments with p-and n-type doping under illumination. Our results show that the shifts of the Fermi levels, and not the changes in surface band bending, are the most important effects under above band-gap illumination. The quantitative electrical information obtained here is important for the use of NW p-n junctions as photovoltaic or rectifying devices at the nanoscale, and is especially relevant since the technique does not require the formation of ohmic contacts to the NW junction.2