A scanning near-field optical microscope for the characterization of optical integrated devices has been developed. Compatible with a normal optical characterization setup the experimental setup allows a tapered uncoated optical fiber to scan the optical device with constant height by means of a shear force control using a tuning fork, and to obtain the evanescent field emerging from it. In this way, images showing simultaneously the topography with lateral resolution better than 10 nm and vertical resolution of 1 nm, and the optical field distribution have been obtained. Images obtained over rib waveguides show the guided mode intensity distribution, allowing characterization of the propagation of the light in the device for up to 1 mm. Identification of the guided mode propagation has been achieved by comparing the images with computer simulations. Measurement of the experimental decay lengths of the evanescent field obtained by the microscope allows a determination of the effective refractive index of the structure to be made.