Formic acid is an important industrial chemical but is toxic and corrosive. To benefit its qualified use and to avoid corrosion or injury from touching, rapid, portable and sensitive on-site sensing of formic acid is thus of considerable importance. Here, a photonic crystal coating sensor for formic acid visual detection is fabricated through the mild co-assembly of both biomass-based cellulose nanocrystals (CNCs) and hydroxypropyl-β-cyclodextrin (HPCD) on a quartz glass slide. Further surface modification by hexadecyltrimethoxysilane (HTDMS) with low surface energy significantly overcomes the inherent water intolerance of the CNC-HPCD composite while maintaining its chiral nematic structure. The resulting hydrophobic CNC-HPCD (H-CNC) sensing slide shows a distinct and rapid structural color change after formic acid stimulation, realizing the formic acid detection by naked eye. By virtue of its stable and repeatable water resistance, the H-CNC sensing slide enables the specific colorimetric detection of formic acid in water-containing environments for qualitative and even quantitative purposes. This study suggests that H-CNC has the potential to act as a high-performance sensing platform that is useful for the colorimetric detection of formic acid in some industrial products.