SiO2 thin film was deposited on quartz glass substrate with radio frequency (RF) magnetron sputtering. The effects of O2/Ar flow ratio and heat treatment on the O/Si molar ratio, surface morphology and optical properties of the film were investigated. SiO2 film was composed of amorphous nanoparticles. When the O2/Ar flow ratio increased from 30% to 60%, the film's O/Si ratio increased continuously from severe O-deficiency 1.68:1 to 1.93:1, close to the stoichiometric ratio 2:1. Meanwhile, the particles' average size decreased and became more uniform, and the surface roughness decreased with the O2/Ar flow ratio increase. And the film's refractive index and absorptivity decreased continuously, while the coated glass substrate's average transmittance (hereinafter referred to as the film's transmittance) within 300–1100 nm increased from 91.7% to 92.9% continuously. Heat treatment at 550 °C resulted in an obvious agglomeration of the nanoparticles, reduced the refractive index of the film and improved its transmittance.