Abstract SiN x and AlN x films were both DC- and RF-magnetron reactively sputtered at various deposition powers and total bleeding pressures as a function of flow rate ratio of Ar to N 2( F= f Ar/ fN 2). The microstructure of the SiN x films is amorphous. A low F results in a smooth and featureless morphology in the RF-magnetron sputtered SiN x films. However, microvoids are present in these films when F is increased. DC-magnetron sputtered SiN x films produce a porous structure as well as a rough surface at a low F, but the porosity of the films appears to be decreased with increasing F. On the other hand, AlN x films consist of small and randomly oriented hcp crystals. In the RF-magnetron sputtered AlN x films, the density of microvoids is high at a low F but is decreased with an increase of F and the deposition rate. In contrast, the density of microvoids is increased with increasing F and the deposition power for the DC-magnetron sputtered AlN x films.