This paper presents a confocal microscope for the rapid and noninvasive capture of three-dimensional (3D) images showing the surface/interface topography in a far-field configuration. The proposed microscope features a nanoscale optical ruler capable of performing fast depth measurements based on the chromatic aberration of microscope objectives. A diffraction grating and a position-sensitive detector were used to extract the spectral shift, which directly maps the height of the surface with a nanoscale resolution. Because neither the mechanical scanning nor the spectrometer, which limit the speed of 3D imaging, are needed in the axial direction, full 3D surface topography images with nanoscale depth resolution can be acquired rapidly using the nanoscale optical ruler in conjunction with 2D lateral beam scanning. The presented technique overcomes the limitation of the detection speed of conventional chromatic confocal microscopy. In experiments, the 3D static and dynamic nanoscale surface profiles of several representative optoelectronic and electronic devices were demonstrated. This fast and non-invasive approach with nanoscale depth resolution to the measurement of topography images has considerable promise in academic research and industrial applications.