A class of fluorescent probes for the detection of sulfite (hydrogen) salts, consisting of benzoindole quaternary ammonium salts, and the molecule has the following structure: Wherein: R is a kind of in alkyl, aryl, nitro, ester group and ether group of 1-18 carbons independently or at the same time, or benzene, naphthalene, anthracene, pyrene, pyridine, pyrrole, indole, One of coumarin, fluorescein, carbazole, rhodamine, fluorene and quinoline and derivatives thereof; n is 0-20; X ‑ for F ‑ , Cl ‑ , Br ‑ or I ‑ , + is a positive charge. The advantages of the invention are: the fluorescent probe has good selectivity to sulfite, and the fluorescence intensity of the fluorescent probe solution and the concentration of sulfite are in the range of 0-8×10 ‑6 The linear relationship in the molar/liter range is good, showing good practical applicability; the fluorescent probe has a short response time, high detection sensitivity, simple molecular structure, and simple synthesis method, which makes it extremely easy for practical application.