Anatase and rutile TiO2-based metal–semiconductor–metal (MSM) ultraviolet photodetectors (PDs) are fabricated and investigated. The TiO2 thin films are grown by the ultrasonic spray pyrolysis deposition and the TiO2 films are annealed at 400 °C and 800 °C to form the anatase and the rutile phases. The material characteristics were measured by X-ray diffraction, Raman spectrum, X-ray photoelectron spectroscopy, and photoluminescence. The optical characteristics such as refractive index, extinction coefficient, absorption coefficient, and optical reflectance were characterized. The electrical and optoelectronic characteristics of the anatase and rutile TiO2 MSM PDs were characterized, including current-voltage, Schottky barrier height, spectral responsivity, response time, and detectivity.