Abstract Ga doped ZnO (GZO) and GaP codoped ZnO (GPZO) thin films of different concentrations (1–4 mol%) have been grown on sapphire substrates by RF sputtering for the fabrication of ZnO homojunction. The grown films have been characterized by X-ray diffraction (XRD), photoluminescence (PL), Hall measurement, energy dispersive spectroscopy (EDS), time-of-flight secondary ion mass spectrometer (ToF-SIMS), UV–Vis–NIR spectroscopy and atomic force microscopy (AFM). Unlike in conventional codoping, here we directly doped (codoped) GaP into ZnO to realize p -ZnO. The Hall measurements indicate that 2 and 4% GPZO films exhibit p -conductivity due to the sufficient amount of phosphorous incorporation while all the monodoped GZO films showed n -conductivity as expected. Among the p -ZnO films, 2% GPZO film shows low resistivity (2.17 Ωcm) and high hole concentration (1.8 × 10 18 cm −3 ) by optimum incorporation of phosphorous due to best codoping. Similarly, among the n -type films, 2% GZO shows low resistivity (1.32 Ωcm) and high electron concentration (2.02 × 10 19 cm −3 ) by optimum amount of Ga incorporation. The blue shift and red shift in NBE emission observed from PL acknowledged the formation of n - and p -conduction in monodoped and codoped films, respectively. The neutral acceptor bound exciton recombination (A 0 X) observed by low temperature PL for 2% GPZO confirms the p -conductivity. Further, the high concentration of P atoms than Ga observed from ToF-SIMS (2% GPZO) also supports the p -conductivity of the films. The fabricated p–n junction with best codoped p -(ZnO) 0.98 (GaP) 0.02 and best monodoped n -Zn 0.98 Ga 0.02 O films showed typical rectification behavior of a diode. The diode parameters have also been estimated for the fabricated homojunction.