The increasing density of data transmission, speed of all- optical signal processing, and demand for higher resolution microscopy and spectroscopy stimulate the development of the nanophotonics. Near-field microscopy is not limited by light diffraction and thus it can achieve sufficiently subwavelength resolution. Therefore this approach is perfect for nanophotonic device characterization. Heterodyne detection allows resolution of the optical phase and improves signal-to-noise performance in near-field microscopy. In this thesis we describe a Heterodyne Near-field Scanning Optical Microscope (HNSOM) and apply this approach to characterization of several classes of the photonic nanodevices. First, possible effects of the microscope probe are analyzed and experimentally studied. We show that a metal-coated NSOM probe can introduce loss to the waveguides and change the quality factor and resonant wavelength of the microring resonators. These effects should be taken into account especially for characterization of highly resonant photonic structures. Then various Photonic Crystal (PhC) devices are studied using the HNSOM. The modal structure of the single line defect PhC waveguide is found and the losses between this component and the channel waveguide are estimated. Using near-field characterization the performance of the self- collimating PhC lattice and the PhC polarization beam splitter are demonstrated. Another approach in nanophotonic device design is to directly transfer free- space functionality to a chip using metamaterials with refractive index variation on a deeply subwavelength scale. Such materials can be described using effective medium theory and have an index of refraction which depends on the structure period, filling factor and light polarization. Several photonic nanodevices utilizing this approach including a planar graded index lens are created and characterized using the HNSOM technique. The viability of the concept is confirmed in these measurements, some fabrication imperfections are found as well. The HNSOM setup is further enhanced by adding the low-coherence measurement capability which allows local study of the dispersive properties of the photonic nanodevices. The application of the technique to the characterization of group indices of refraction of silicon waveguides is shown.