Perovskite-type N-substituted SrTiO3 thin films with a preferential (001) orientation were grown by pulsed laser deposition on (001)-oriented MgO and LaAlO3 substrates. Application of N2 or ammonia using a synchronized reactive gas pulse produces SrTiO3-x:Nx films with a nitrogen content of up to 4.1 at.% if prepared with the NH3 gas pulse at a substrate temperature of 720 °C. Incorporating nitrogen in SrTiO3 results in an optical absorption at 370-460 nm associated with localized N(2p) orbitals. The estimated energy of these levels is ≈2.7 eV below the conduction band. In addition, the optical absorption increases gradually with increasing nitrogen content.