An approach to acquire axial structural information at nanoscale is demonstrated. It is based on spectral encoding of spatial frequency principle to reconstruct the structural information about the axial profile of the three-dimensional (3D) spatial frequency for each image point. This approach overcomes the fundamental limitations of current optical techniques and provides nanoscale accuracy and sensitivity in characterizing axial structures. Numerical simulation and experimental results are presented.