An all-transparent ultraviolet (UV) photodetector was fabricated by structuring p-NiO/n-SnO2/ITO on a glass substrate. SnO2 is an important semiconductor material because of its large bandgap, high electron mobility, high transmittance (as high as 80% in the visible range), and high stability under UV light. For these reasons, SnO2 is suitable for a range of applications that involve UV light. In order to form a highly transparent p-n junction for UV detection, SnO2 was deposited onto a device containing NiO as a high-transparent metal conductive oxide for UV detection. We demonstrated that all-transparent UV photodetectors based on SnO2 could provide a definitive photocurrent density of 4 nA cm-2 at 0 V under UV light (365 nm) and a low saturation current density of 2.02 nA × cm-2. The device under UV light displayed fast photoresponse with times of 31.69 ms (rise-time) and 35.12 ms (fall-time) and a remarkable photoresponse ratio of 69.37. We analyzed the optical and electrical properties of the NiO/SnO2 device. We demonstrated that the excellent properties of SnO2 are valuable in transparent photoelectric device applications, which can suggest various routes for improving the performance of such devices.