A depth compensation algorithm (DCA) can effectively improve the depth localization of diffuse optical tomography (DOT) by compensating the exponentially decreased sensitivity in the deep tissue. In this study, DCA is investigated based on computer simulations, tissue phantom experiments, and human brain imaging. The simulations show that DCA can largely improve the spatial resolution of DOT in addition to the depth localization, and DCA is also effective for multispectral DOT with a wide range of optical properties in the background tissue. The laboratory phantom experiment demonstrates that DCA can effectively differentiate two embedded objects at different depths in the medium. DCA is further validated by human brain imaging using a finger-tapping task. To our knowledge, this is the first demonstration to show that DCA is capable of accurately localizing cortical activations in the human brain in three dimensions.