Alkaline earth and rare-earth fluoride thin films were prepared on silica glass substrates by a sol-gel process using trifluoroacetic acid (TFA) as a fluorine source. Homogeneous solutions were obtained by stirring a mixture of alkaline earth or rare-earth metal acetates, TFA and H2O, dissolved in isopropanol. The solutions were spin-coated and heated at 300–800 °C. The fluoride thin films were obtained by heat treatment around 400 °C in air. The crystallization behavior, the surface morphology, and the optical properties of the films depended on the heating temperature as well as the chemical species of the metal ions.