This work reports on the development and characterization of Zinc Oxide (ZnO) nanocrystalline thin films deposited on glass substrates by spray pyrolysis method. The effect of 1 % Mg-doping and 6 % F/ x % Mg co-doping (x 1, 2 and 3) on the structural, morphological, optical and electrical properties of the films obtained is studied. The structural characterization shows that all the deposited layers are polycrystalline with a hexagonal wurtzite-type structure due to the existence of a more intense peak relative to the (002) peak, located around an angle of 34.13° with no other phase detected. The measured contact angles are more than 90° for pure, doped and 6 % F/1 % Mg co-doped films prepared, which confirms the hydrophobic character, while other co-doped films (6 % F:2 % Mg and 6 % F:3 % Mg) show the hydrophilic character at values of the contact angle 90°. A higher transmittance value of 86.47 %, a wide band gap of 3.53 eV and lower disorder (330.03 meV) are observed for the 6 % F:1 % Mg co-doped film. Co-doping with 1 % Mg considerably improves the electrical conductivity ( 0.030 (Ω.cm) -1 ). The results suggest that the co-doped ZnO film (6 % F, 1 % Mg) can be used as a window film in thin film solar cells.