A method for the preparation of TiO2 thick films made of anatase nanocrystallites and featuring a mesoporous structure is described. Modification of a typical sol–gel synthesis that uses Titanium (IV) isopropoxide (TTIP) as precursor, through both the incorporation of a non-ionic surfactant (Tween 20) and the optimization of thermal treatments, allows to increase the thickness of each spin-coated layer, and to obtain by successive runs porous, transparent, homogeneous and crackless films with thickness up to 1.2 μm.