This article reports the synthesis and characterization of pure and N-, B-, and Ag-doped TiO 2 and the ability of these oxides to photodegrade methylene blue (MB) under sunlight or UV-ABC radiation. The compounds were synthesized using the sol-gel method and characterized by scanning electron microscopy, X-ray diffraction, diffuse reflectance spectroscopy, Fourier transform infrared spectroscopy, thermogravimetric analysis, and X-ray photoelectron spectroscopy. Photocatalytic efficiency was significantly increased by N-doping, resulting in 98% MB decomposition under UV-ABC irradiation for 180 min. Ag-and B-doped TiO 2 lowered MB degradation rates to 52 and 73%, respectively, compared with pure TiO 2 . The same behavior was observed with exposure to UV-Vis, with 88, 65, 60, and 42% MB removal with N-doped, pure, B-doped, and Ag-doped TiO 2 , respectively. Under visible light alone, N-doped TiO 2 exhibited higher photocatalytic efficiency than commercial P25-type TiO 2 . Photocatalysis with N-doped TiO 2 proved to be a promising alternative for MB degradation, given the potential of employing solar energy, thus minimizing operating costs.