Titania films with nano-sized pores were prepared on the NaOH?HCl pretreated NiTi alloy substrate by sol?gel method.A crack-free film is obtained for the sample with a dense inner layer and a porous outside layer(sample TC1+1).The X-ray diffraction shows that the titania films are composed of anatase,and a little Ni4Ti3 phase in the heat treated substrate is also detected.The X-ray photoelectron spectroscopy results indicate that the titania film completely covered the NiTi substrate for sample TC1+1.The sample TC1+1 is hydrophilic with a contact angle about 20°,and UV illumination treatment for 15 min further decreases the contact angle to(9.2±3.2)°.The potentiodynamic polarization test in 0.9% NaCl solution reveals a better corrosion resistance of sample TC1+1 than the polished NiTi sample.