Thin films of highly transparent amorphous silicon oxynitride (a-SiOx Ny:H) were prepared by rf glow discharge decomposition of SiH4,NH3 and N2O gases, in a PECVD reactor provided with an in situ phase-modulated ellipsometer. The ratio [N2O]/ ([N2O] + [NH3]) was varied from 0 to 1 in a dilution with 5% of SiH4, keeping constant the total gas flow rate. From spectroscopic ellipsometric measurements, performed in the range 1.5–5.0 eV, the refractive index of the films was calculated applying the Bruggeman effective medium theory. The structural model used considers a three-component mixture layer, composed of void, silicon dioxide (glass) and silicon nitride (pyrolitic), on a c-Si substrate. The x and y composition parameters were calculated from the fitted relative volume fraction of each constituent, ranging from a-SiO2 N0:H to a-SiO0N1.33:H, which are in fair agreement with those obtained from XPS measurements. These results, along with data of FTIR spectra of the films show a clear correlation between the void fraction and the bonded hydrogen content of the films.