Dye-sensitized solar cell (DSSC) is one of the very promising alternative renewable energy sources to anticipate the declination in the fossil fuel reserves in the next few decades and to make use of the abundance of intensive sunlight energy in tropical countries like Indonesia. In the present study, TiO2 nanoparticles of different nanocrystallinity was synthesized via sol−gel process with various water to inorganic precursor ratio (Rw) of 0.85, 2.00 and 3.50 upon sol preparation, followed with subsequent drying, conventional annealing and post-hydrothermal treatments. The resulting nanoparticles were integrated into the DSSC prototype and sensitized with an organic dye made of the extract of red onion. The basic performance of the fabricated DSSC has been examined and correlated to the crystallite size and band gap energy of TiO2 nanoparticles. It was found that post-hydrothermally treated TiO2 nanoparticles derived from sol of 2.00 Rw, with the most enhanced nanocrystalline size of 12.46 nm and the lowest band gap energy of 3.48 eV, showed the highest open circuit voltage (Voc) of 69.33 mV.