We report on a heterodyne interferometric scanning near-field optical microscope developed for characterizing, at the nanometric scale, refractive index variations in thin films. An optical lateral resolution of 80 nm (lambda/19) and a precision smaller than 10(-4) on the refractive index difference have been achieved. This setup is suitable for a wide set of thin films, ranging from periodic to heterogeneous samples, and turns out to be a very promising tool for determining the optical homogeneity of thin films developed for nanophotonics applications. (C) 2009 American Institute of Physics. [doi:10.1063/1.3226660]