The remediation of pollution from textile dyes poses a significant challenge. Recently, photocatalytic nanomaterials derived from semiconductor oxides have garnered attention to address this issue. This study focuses on the synthesis of ZnO/TiO2 nanocomposites with various Zn(II):Ti(IV) molar ratios via the sol-gel method for textile wastewater treatment. The properties of these materials are thoroughly characterized using a suite of analytical techniques, including transmission electron microscopy (TEM), X-ray diffraction (XRD) analysis, X-ray fluorescence (XRF) spectroscopy, Brunauer–Emmett–Teller (BET) surface area analysis, and UV-Vis spectroscopy. Analysis via XRD and XRF confirms the formation of a ZnO/TiO2 heterostructure, while TEM imaging reveals a quasi-spherical morphology with slight agglomeration. Notably, the ZnO/TiO2 nanocomposite with a Zn(II):Ti(IV) molar ratio of 1:5 demonstrates the largest BET surface area (91.345 m2g-1) and the narrowest band gap (Eg = 3.06 eV) as compared to other synthesized compositions. The impact of precursor ratios on photocatalytic activity is assessed through the measurement of methylene blue dye discoloration under sunlight irradiation. Additionally, the antibacterial efficacy against Salmonella typhi and Staphylococcus aureuswas quantitatively evaluated for the ZnO/TiO2 nanocomposites, suggesting potential applications in the treatment of pollutants present in textile wastewater.