A spectrophotometric method based on diazotization of aniline with triclosan has been developed for the determination of triclosan in water samples. The diazotization process involves two steps: (1) reaction of aniline with sodium nitrite in an acidic medium to form diazonium ion and (2) reaction of diazonium ion with triclosan to form a yellowish-orange azo compound in an alkaline medium. The resulting yellowish-orange product has a maximum absorption at 352 nm which allows the determination of triclosan in aqueous solution in the linear concentration range of 0.1–3.0 μM with R2 = 0.998. The concentration of hydrochloric acid, sodium nitrite, and aniline was optimized for diazotization reaction to achieve good spectrophotometric determination of triclosan. The optimization of experimental conditions for spectrophotometric determination of triclosan in terms of concentration of sodium nitrite, hydrogen chloride and aniline was also carried out by using Box–Behnken design of response surface methodology and results obtained were in agreement with the experimentally optimized values. The proposed method was then successfully applied for analyses of triclosan content in water samples.