We report on the use of Kelvin force microscopy as a method for measuring very short minority carrier diffusion length in semiconductors. The method is based on measuring the surface photovoltage between the tip of an atomic force microscope and the surface of an illuminated semiconductor junction. The photogenerated carriers diffuse to the junction, and change the contact potential difference between the tip and the sample as a function of the distance from the junction edge. The diffusion length L is then obtained by fitting the measured contact potential difference using the minority carrier continuity equation. The method is applied to measurements of electron diffusion lengths in GaP epilayers.