Pure and magnesium (Mg) doped zinc oxide (ZnO) thin films were prepared onto clean glass substrate by spray pyrolysis (SP) technique at the substrate temperature of 300°C. Various optical parameters such as absorption co-efficient, band gap energy, refractive index, extinction coefficient of the thin films were studied using UV-VIS-NIR spectrophotometer in the photon wavelength range of 300-2500 nm. Optical band gap increased from 3.24 to 3.46 eV with the increase of Mg concentration from 0 to 40%. Transmittance and refractive index of the Mg doped ZnO thin films decreased due to the increase of Mg concentration. The EDX spectra confirmed the increase of Mg and consequent reduction in Zn content in the Mg doped ZnO thin films. Pure and Mg- doped ZnO films were annealed at 425°C for 1 hour. X-ray diffraction (XRD) study of the annealed films showed hexagonal type of polycry-stalline structure with the preferred orientation along (101) plane with some other peaks (100), (002), (102), (110), (103) and (112). From the XRD patterns it was found that grain size decreased from 63.45 to 36.56 nm, lattice constant _ and c remained almost constant with Mg doping concentration.Dhaka Univ. J. Sci. 64(1): 1-6, 2016 (January)