The effects of sulfite on the etching processes of silicon and silica in 40% ( w) NH4F aqueous solution have been studied by a method based on photolithography and atomic force microscopy (AFM). It is demonstrated that the silicon and silica etching rates depend on the sulfite concentrations. The spectra of the F 1 s core level in the high resolution X-ray photoelectron spectroscopy (XPS) for surfaces treated in solutions with/without sulfite suggest the chemistry of the surfaces is different in the two cases. The experimental results indicate that sulfite not only acts as an oxygen scavenger, but also influences the surface reactions in the wetting etching of Si and SiO2.