In this paper, a novel solid state pH sensor was fabricated by anodization of titanium substrate electrode. The relationship between pH sensitivity and hydrophilicity or surface morphology of TiO 2 film was investigated. Amorphous TiO 2 nanotube has better pH response than anatase TiO 2 nanotube. After being irradiated by ultraviolet light (UV), the potential response of the electrode modified by amorphous TiO 2 nanotube was close to Nernst equation (59 mV/pH). SEM, XRD, and XPS were used to characterize electrodes. Possible mechanism was discussed by analyzing surface hydroxyl groups, crystal structure and hydrophilicity of the electrodes. The electrode has been used to detect some kinds of soft drinks and shows good response.