Zn 1Àx Mg x O (ZMO) films were prepared by the ultrasonic spray pyrolysis technique and effects of doping on structural, optical, electrical, and surface properties were examined. The film structures were studied by X-ray diffraction. X-ray diffraction patterns of the films showed that the ZMO films exhibited hexagonal wurtzite crystal structure with a preferred orientation along (0 0 2) direction. Texture coefficient, grain size values, and lattice constants were calculated. The optical properties like transmission, reflection, and absorption were investigated with UV-Vis spectrophotometer. The optical measurements reveal a shift in absorption edge and optical band gap of ZMO films changed with Mg content. Optical parameters (refractive index, extinction coefficient) and thicknesses of the films were investigated by spectroscopic ellipsometry (SE). Surface and electrical properties of the films were studied using atomic force microscopy and four-probe technique, respectively. After all investigations, it is concluded that the ZMO thin films can be used in photovoltaic solar cells as window materials and cell efficiencies can be increased using different content rates.