A TiO2 barrier layer is critical in enhancing the performance of dye-sensitized solar cells (DSSCs). Two methods to prepare the TiO2 barrier layer on fluorine-doped tin dioxide (FTO) surface were systematically studied in order to minimize electron-hole recombination and electron backflow during photovoltaic processes of DSSCs. The film structure and materials properties were correlated with the photovoltaic characteristics and electrochemical properties. In the first approach, a porous TiO2 layer was deposited by wet chemical treatment of the sample with TiCl4 solution for time periods varying from 0 to 60 min. The N719 dye molecules were found to be able to insert into the porous barrier layers. The 20 min treatment formed a nonuniform but intact TiO2 layer of ∼100-300 nm in thickness, which gave the highest open-circuit voltage VOC, short-circuit photocurrent density JSC, and energy conversion efficiency. But thicker TiO2 barrier layers by this method caused a decrease in JSC, possibly limited by lower electrical conductance. In the second approach, a compact TiO2 barrier layer was created by sputter-coating 0-15 nm Ti metal films on FTO/glass and then oxidizing them into TiO2 with thermal treatment at 500 °C in the air for 30 min. The dye molecules were found to only attach at the outer surface of the barrier layer and slightly increased with the layer thickness. These two kinds of barrier layer showed different characteristics and may be tailored for different DSSC studies.