Tungsten oxide (WOx) films were fabricated by (i) reactive thermal evaporation (RTE) at room temperature with oxygen ambient pressure PO2 as a parameter, and (ii) reactive magnetron sputtering (RMS) with substrate temperature Ts as a parameter. The film structure revealed by x-ray photoelectron spectroscopy, x-ray diffraction, density measurements, infrared absorption, and atomic force microscopy was correlated with the nanoindentation hardness H. The RTE WOx films deposited at high Po2 were amorphous and porous, while H depended appreciably on normalized penetration depth hD (indentation depth/film thickness) due to the closing of the pores at the point of indentation. Decrease in Po2 from 10 to 2 × 10−3 mtorr led to smaller porosity, weaker hD dependence of H, and higher average H (measured at hD ≈ 0.2 to 0.3, for example). The RMS WOx film deposited at room temperature was amorphous and denser than all RTE films. The rise in substrate temperature Ts first densified the film structure (up to 110 °C) and then induced crystallization with larger grain size for Ts ≥ 300 °C. Correspondingly, the hD dependence of H became weaker. In particular, H of the RMS sample deposited at 110 °C showed a peak at hD slightly above 1 owing to pileup at the contact point of indentation. For higher Ts, pileup occurred at shallower hD and the average H (measured at hD ≈ 0.2 to 0.3, for example) rose, accompanied by the increase of grain size.