In this paper we present a new possibility for local voltage detection based on atomic force microscopy (AFM). We use the non contact resonant mode which is sensitive to local force gradients and then those related to electrostatics. The principle is given, experiments illustrate this effect both on metal and on an Integrated Circuit pad buried under insulator. The sensitivity of the method is discussed.