Herein, a two-photon (TP) ratiometric fluorescent probe (NpFA) was developed for detecting formaldehyde (FA) in real food samples, living onion tissues and zebrafish by fluorescence resonance energy transfer (FRET) strategy. Specifically, a TP fluorophore as the donor and a FA turn-on naphthalimide fluorophore as the acceptor were connected by a non-conjugated linker to construct the TP-FRET-based NpFA, which exhibited a target-modulated ratiometric fluorescence response to FA rapidly with high selectivity and sensitivity during 65 s, and a lar...