The enhanced photocatalytic activity of tungsten trioxide (WO3) has been observed experimentally via doping with S element as different dopant types. Herein, a comparative study on the effect of different types of S dopant and native vacancy defects on the electronic structure and optical properties of WO3 is presented by using hybrid Heyd–Scuseria–Ernzerhof 2006 (HSE06) density functional methods. Six possible models (SO–WO3, SW–WO3, VO–WO3, VW–WO3, SO + VW–WO3 and SW + VO–WO3) based on WO3 are tentatively put forward. It is found that cationic S doping (the substitution of W by S) is more favorable than anionic S doping (replacing O with S), and both cases become easier to form as native vacancy defect is accompanied. The electronic structures of doped WO3 depend on the type of dopant: anionic S doping results into three isolated levels in the upper part of valence band, while cationic S doping only induces an effective band gap reduction, which is critical for efficient light-to-current conversion. Interestingly, the isolated states near gap of WO3 would appear as long as native vacancy defects exist. The introduced levels or reduced band gaps make the systems responsed to the visible light, even further to a range of 400–700 nm. These findings can rationalize the available experimental results and pave the way for developing WO3-based photocatalysts.