Highly ordered closely packed TiO2 nanotubes were successfully fabricated by anodization of Ti foils in ethylene glycol-based electrolytes. For an identified electrolyte, the dependence manner of the nanotube dimension to the anodization parameters, including anodization voltage and time were systematically investigated. The inner diameter depends linearly on the anodization voltage but is time independent. The morphology of the tube is relative to the anodization voltage. The tube length is closely relative to the anodization time. Keeping the anodization voltage, the length will increase with the time rising to an extent and then maintain a relatively steady value. Longer nanotubes will be obtained when the anodization voltage is higher for a determined time. TiO2 nanotube-based dye-sensitized solar cells (DSSCs) were fabricated. The results showed that the conversion efficiency was related to the tube dimension. The optimum efficiency of 4.25% is obtained.