Morphology engineering is of prime significance in designing semiconductor photoelectrodes for efficient photoelectrochemical (PEC) fuel generation. Herein, we report a strategy to fabricate nanostructured tungsten oxide films using anodic oxidation of tungsten and their performance as photoanodes for PEC water splitting. A solution of an organic compound, dimethyl sulfoxide, with hydrofluoric acid was used as the electrolyte. The anodization parameters such as voltage and electrolyte temperature were found to have a critical influence in determining the porous nature and dimensions of the resulting oxide film. Anodization conducted at a voltage ~10 V and a temperature ~40 °C led to the formation of compact tungsten oxide films due to the low strength of the electric field partially responsible for the porous morphology development. The surface of the film became porous at elevated temperatures. At higher voltages, a thin nanoporous film atop a thicker compact layer was formed; however, the structure became more disordered and less porous when the electrolyte temperature was increased. The study demonstrated that by adjusting the voltage and temperature, the oxide film morphology could be varied from a compact layer to a porous structure resembling nanotubes. The films heat treated at 500 °C attained the monoclinic phase of WO3. The PEC performance was influenced strongly by the morphology of the films. The films with nanotube like morphology yielded incident photon to current conversion efficiency values of over 40%. This study would provide a practical basis for developing optimal WO3 nanostructures for efficient PEC fuel generation.