Ellipsometric measurements performed on TiO2 films, 7-170 nm thick, evaporated on glass substrates using an electron gun have been successfully interpreted in terms of inhomogeneities in the depth of the films. In a first attempt, the complex index of refraction was calculated by assuming a one-layer model (ambient/homogeneous film/substrate). For thin films (d < 60 nm), the dispersion of the real part of the index n is smooth, as expected, and the mean value of the imaginary part k is zero, except for wavelengths lower than 0.4 mum, when TiO2 becomes absorbing. For thicker films (d > 60 nm), non-physical oscillations in n and even more in k appear, indicating that the one-layer model is no longer valid. A two-layer model was then used, which assumes the existence of a superficial layer in TiO2 films. The oscillations in k are suppressed for all films when this superficial layer is about 3-5 nm thick and is less dense than the main part of the film (DELTAn almost-equal-to 0.4). The existence of such a surface layer has been confirmed by X-ray reflectometry at grazing incidence.