The authors report the formation of β-Ga 2 O 3 /GaN heterostructure and the fabrication of a β-Ga 2 O 3 /GaN bilayer photodetector (PD). It was found that we could control the depletion depth of the device and thus switch the operation mode between solar-blind and visible-blind by simply changing the applied bias. It was also found that we could achieve a deep-ultraviolet (UV) to near-UV contrast ratio of 200 when the device was biased at -1 V. Furthermore, it was found that near-UV to visible contrast ratio of the fabricated β-Ga 2 O 3 /GaN PD was 260 when biased at -10 V.