Compared to the pristine WO3, the oxygen vacancy defect levels of the sub-stoichiometric WO3−X narrow the bandgap and promote the separation of photogenerated electron–hole pairs.