This study reports the synthesis of un- and chromium (Cr)-doped tin dioxide \((\hbox {SnO}_{2})\) nanoparticles (NPs) through chemical precipitation and their application for photodegradation of methylene blue dye. The obtained NPs were characterized by X-ray diffraction (XRD) analysis, transmission electron microscopy (TEM), Fourier transform infrared (FT-IR) spectroscopy, elemental mapping and ultraviolet–visible (UV–Vis) spectroscopy. The TEM and XRD results demonstrated that the \(\hbox {SnO}_{2}\) NPs are spherical and contain polycrystalline tetragonal crystals. UV–Vis spectra showed that increasing the concentration of the Cr dopant enhances the light absorption potential of the \( \hbox {SnO}_{2} \) NPs. Finally, the findings of the photocatalytic experiments performed for 120 min in ultraviolet irradiation under ambient conditions revealed an improvement in the degradation efficiency of the \( \hbox {SnO}_{2} \) NPs by Cr doping.