It is well known that the phase change in total internal reflection (TIR) is a function of the refractive indices of the pair of media involved. The spatial phase variations in a totally internally reflected beam are accurately measured using a Mach Zehnder interferometer employing polarization phase shifting technique. The evaluated phase change is then related to the refractive index variations of the rarer medium. One of the salient features of the proposed technique is that, unlike most interferometric methods where the measured phase is a function of the sample thickness, TIR phase is independent of the sample thickness as long as the evanescent wave field is fully confined within the sample. The theory of the technique is discussed and experimental results showing the three-dimensional profiles of the measured refractive indices and its spatial variations are presented. © 2016 Society of Photo-Optical Instrumentation Engineers (SPIE).