We developed fluorescence sensor for detecting HCHO. Such molecular sensors have great potential to be utilized. We hope that this simple fluorescent probe can arouse widespread attention in the fields of molecular sensing and food chemistry.