We evaluate the impact of defects in WO3 thin films on the photoelectrochemical (PEC) properties during water splitting. We study physical defects, such as micro holes or cracks, by two different deposition techniques: sputtering and atomic layer deposition (ALD). Chemical defects, such as oxygen vacancies, are tailored by different annealing atmospheres, i.e. air, N2, and O2. The results show that the physical defects inside the film increase the resistance for the charge transfer and also result in a higher recombination rate which inhibits the photocurrent generation. Chemical defects yield in an increased adsorption of OH groups on the film surface and enhance the PEC efficiency. Excess amount of chemical defects can also inhibit the electron transfer, thus decreasing the photocurrent generation. In this study, the highest performance was obtained for WO3 films deposited by ALD and annealed in air, which have the least physical defects and an appropriate amount of oxygen vacancies.