A very limited knowledge exists about the effect of non-uniform doping of epitaxially grown strontium titanate thin film electrodes on their photoelectrochemical performance in water splitting. In this work, water splitting photoanodes featuring an n+-n homojunction were fabricated by the pulsed laser deposition technique, where epitaxial SrTiO3 thin films were grown on Nb doped n+-SrTiO3 single crystalline substrates. Thermal diffusion of niobium from doped substrates into the deposited thin films formed an n+-n homojunction, which was profiled by angle-resolved XPS and cross-sectional STEM-EDX techniques. This homojunction was found to make a significant impact on the incident photon-to-current efficiency of photoanodes by affecting their depletion width, which was in agreement with the theoretical simulations.