An innovative high precision optical focus probe has been developed to measure the grating pitches. This probe uses characteristics of FES (focus error signal) of the modified DVD pickup head. Experimental tests showed the linear range of FES of this probe to the gratings was 5μm, the resolution was less than 1nm, the time stability was 5nm in 10 minutes, and positioning repeatability was better than 12nm. This system was applied to measure the grating pitch of 1200 lines per 1mm. The quality of the grating was assessed by the average of sampled pitches and its standard deviation. The inspected results can be an index to improve the process control of the grating fabrication.