Undoped and boron doped ZnO films (nominal volume B/Zn ratio = 1%, 3% and 5%) were deposited onto glass substrates by the sol gel method using spin coating technique. Zinc acetate dihydrate (ZnAc), 2-methoxyethanol and monoethanolamine (MEA) were used as a starting material, solvent and stabilizer, respectively. Trimethyl borate (TMB) was used as a dopant source. The pH value of the sol was adjusted with glacial acetic acid and ammonia and it changed from acid to base in nature. The effect of pH value and B dopant on the structural, morphological and optical properties of the films was investigated. The crystalline structure and orientation of the films were investigated using XRD study. The crystallite size of the films was determined. The XRD analyses showed that the undoped ZnO film crystallinity enhanced when pH of the precursor sol was increased from 5.05 to 7.00. Surface morphology was studied by a field emission scanning electron microscope (FESEM), and the effects of the doping concentration and pH values on the microstructure of the films were investigated. The optical band gap values on the surface morphology of the films were determined. The absorption edge shifted depending on the pH values and the B dopant. (C) 2011 Elsevier B.V. All rights reserved.