This paper describes the synthesis of N-doped, F-doped, and N-F-codoped TiO2 powders (NTO, FTO, NFTO) by spray pyrolysis (SP). An overall comparative study was carried out on these anion-doped powders in order to elucidate the roles of N and F played in visible-light (Vis)-driven photocatalysis. The comparisons in their characteristics were based on the analysis of UV-Vis, PL, NH3-TPD and ESR spectra. As the results, N-doping into TiO2 resulted in both the improvement of Vis absorption and the creation of surface oxygen vacancies (OVs). F-doping produced several beneficial effects including the creation of surface OVs, the enhancement of surface acidity and the increase of Ti3+ ions. The photocatalytic tests indicated that the NFTO demonstrated the highest Vis activity for decomposition of both acetaldehyde and trichloroethylene. This high activity was ascribed to a synergetic consequence of doped N and F.