A sensitive and selective formic acid sensor could be useful in detecting this corrosive acid in industrial,medical, and environmental settings. Herein, we present a film for detection of formic acid. We introducedchitosan as a film-forming factor to creatively overcome the problem that chitosan dissolves inacids. A carboxylic acid-carbon dot solution was used to replace the strong acid solution and prepare aluminescent film in which the color changed from green to blue when it was exposed to formic acid. Integrated data analysis of the film was used to distinguish vapor from formic acid/water solutions at differentconcentrations and with a detection limit of 0.01% v/v. The selectivity of the sensor was also investigated. After fumigation with ethanol and other common solvents, there was no response similar to thatfor formic acid. It is believed that films based on lanthanide complexes and chitosan could prevent corrosionand injury from formic acid.