The sensitive and selective determination of formaldehyde is very significant in food safety and environmental protection. In this paper, a novel perylenediimide based fluorescent probe for formaldehyde has been constructed. The probe can be used to detect formaldehyde rapidly, facilely and sensitively, and it exhibited an obvious fluorescence enhancement (at 582 nm) within 1 minutes, and the enhanced yellow fluorescence can be easily observed by the naked eyes. Importantly, the probe showed strong anti-interference abilities to protons and other small molecules. Moreover, the density functional theory was performed to understand the Turn-On process and the probe was successfully used to detect formaldehyde in living cells.