To study the optical properties of nanocomposites as well as antibacterial activity. The experimental study was conducted at the University of Babylon, College of Science and College of Education for Pure Sciences, Babylon, Iraq, from September 2021 to February 2022. Impregnation of transparent matrix polyvinyl alcohol and polyvinyl pyrrolidone nanocomposites was done by silver oxide and niobium oxide nanoparticles. The nanostructures were created using different ratios of polymer matrix, silver oxide nanoparticles and niobium oxide nanoparticles. The optical features of these nanocomposites were examined, whereby the latter type of properties was tested within the wavelength range of 220-820nm. The determination of the anti-microbial activity was done by disc diffusion method. The anti-bacterial activity involved gram-positive and gram-negative organisms. Different bacteria were cultured with Muller-Hinton medium. Absorbance, absorption coefficients and optical conductivity of the nanocomposites increased with the increase in nanocomposite concentrations. The energy gap for silver oxide and niobium oxide nanoparticles decreased when the concentrations of the nanoparticles increased. Promising outcomes may be achieved for the nanocomposites in anti-bacterial applications as the inhibition zones increased along with increased ratio of silver oxide and niobium oxide nanoparticles.