Variable angle spectroscopic ellipsometry (VASE) and ellipsometric porosimetry (EP) have been used to study the effect of treatment with hexamethyldisilazane (HMDS) on the porosity of silica xerogel films. Chemical modification of the surface with HMDS was found to reduce the porosity by approximately 15%. This reduction was connected with changes which occur in the silica network, with further condensation or the reaction between neighbouring trimethylsilyl (TMS) surface groups being possible causes.