AbstractThe aim of this study was to statistically evaluate the capability of a prepared TiO2/gum tragacanth hydrogel as a photocatalyst for the removal of methylene blue dye molecules from contaminated solutions. In this regard, TiO2 nanoparticles were sonicated in gum tragacanth and the final hydrogel was prepared by the addition of glutaraldehyde as a crosslinking agent. Response surface methodology was employed as a mathematical and statistical tool to describe the system by a polynomial equation that relates the removal efficiency to selected variables (time, pH, initial dye concentration and photocatalyst dosage). The significance and adequacy of the model were confirmed by high coefficient of determination (R2) and adjusted R2 values (>93%). The system was optimized at an initial dye concentration of 9.37 mg L−1, pH of 9.02, time of 124.34 min and photocatalyst dosage of 0.13 g L−1 using the response optimizer with an efficiency of 88.86%. A kinetic study of photocatalytic decoloration indicated that the pseudo‐second‐order model was well fitted to the experimental data. © 2018 Society of Chemical Industry