This work aims to tune the structural and optical properties of TiO2/FTO heterojunction by cobalt doping for optoelectronic applications. Undoped and cobalt doped TiO2/FTO heterojunctions were prepared by the spray pyrolysis method. The morphological and elemental investigations were performed using the scanning electron microscopy technique. The FT-IR spectroscopy was applied to investigate the functional groups and structures’ modifications of the samples. The XRD technique was used to explore the structural properties of all samples. Clear modifications in the investigated structural parameters were obtained. The UV-Vis. spectroscopy technique was used to explore the linear/nonlinear optical performance of all heterojunctions. The Herve-Vandamme model was applied to examine the refractive index n. It is found that all optical parameters (refractive index, extinction coefficient, dielectric constants, optical conductivity, etc.) are altered due to cobalt doping. The optical analysis reveals that linear susceptibility, nonlinear third-order susceptibility and nonlinear refractive index of TiO2/FTO heterojunction are tuned through cobalt doping. The obtained findings in this work nominate the potential candidacy of cobalt doped TiO2/FTO heterojunction in plenty of optoelectronic applications.