We have demonstrated a photoelectrochemical solar-blind ultraviolet (UV) detector based on SrTiO3 (STO) nanocrystalline film in this work. The assembled UV detector presents a high on/off ratio of about 6433 under periodic UV irradiation, a high photocurrent density of 220.6 μA cm−2, and a fast response time of 9 ms. By introducing a block layer (BL) on fluorine-doped tin oxide substrate, the response and decay times are shortened to 6 ms and 8 ms, respectively. The BL plays a crucial part in hindering the recombination of electrons from electrolyte carriers and avoiding short circuits. Due to its excellent light capture capability, the detector based on SrTiO3 nanocrystalline exhibits high sensitivity to weak UV light (5 μW cm−2). Moreover, the detector also exhibits visible-blind characteristics and a good linear response.