Nanocrystalline porous nitrogen doped titanium dioxide (TiO2) thin films were prepared by DC magnetron sputtering. Films were deposited in a plasma of argon, oxygen, and nitrogen, with varying nitrogen contents. The films were characterized by X-ray diffraction, scanning electron microscopy, and optical- and photoelectrochemical (PEC) measurements. These studies showed that the films were porous and displaying rough surfaces with sharp, protruding nodules having a crystal structure varying from rutile to anatase depending on the nitrogen content. All nitrogen doped films showed visible light absorption in the wavelength range from 400 to 535 nm. The PEC properties of the thin film electrodes were determined on as-deposited as well as dye-sensitized films. The nitrogen doped TiO2 generated an incident photon-to-current efficiency response in good agreement with the optical spectra. The PEC measurements on dye-sensitized films showed that the electron-transfer properties in the conduction band were similar ...