• • Gradient Sn-doped β-Ga2O3 photoanode achieves a responsivity of 66.88 mA W−1 and detectivity of 8.12 × 10^11 Jones under 254 nm irradiation without external bias, outperforming most reported PEC-type photodetectors.
• • The full-space built-in electric field, induced by Sn concentration gradient, increases band bending width, significantly reducing bulk charge recombination and enhancing carrier separation/transport.
• • Device exhibits fast response with rise/decay times of 79/65 ms, and excellent long-term stability, enabling high-resolution underwater UV imaging.
• • The gradient doping strategy via sol–gel and rapid thermal annealing offers a scalable, low-cost route to fabricate high-performance self-powered solar-blind UV photodetectors.