A full-field polarization-based technique is presented for quantitative evaluation of the spatial distribution of the refractive index in macro and micro samples. The sample is mounted on a glass–air interface of a prism, illuminated by a linearly polarized collimated light beam, and two intensity frames are digitally recorded with specific orientations of an analyzer. The pair of intensity data frames captured with this simple setup is combined through an algorithm specially developed for the purpose, to yield the phase difference between the transverse electric and transverse magnetic components of the total internally reflected light field. The phase difference is then related to the refractive index of the sample. Experimental results for refractive index variations in a laser-etched glass plate and red blood corpuscles are presented. One of the salient features of the proposed technique is that the depth of measurement is dependent on the penetration depth of the sample’s evanescent field, which is typically of the order of a few hundred nanometers, thereby facilitating refractive index measurements along a thin section of the sample. © 2017 Optical Society of America.