A novel chemical sensor SD based on Rhodamine B hydrazide derivative was designed and synthesized, which displayed both colorimetric and "turn-on" fluorescence responses for Hg2+ in DMSO/H2O (1 : 9, v/v) solution. In the presence of mercury ions, the sensor SD showed an obvious change in color from colorless to distinct rose red by naked eyes and rapidly provided bright orange fluorescence under UV lamp in the aqueous solution. The detection limit on fluorescence response of SD to Hg2+ was as low as 2.71 x 10(-7)M. Compared to other metal ions such as Fe3+, Co2+, Ni2+, Cd2+, Pb2+, Zn2+, Cr3+, Cu2+, Ag+, Ca2+ and Mg2+, SD could only selectively recognizes Hg2+.The results of the Job's plot and infrared spectra analysis suggested that the combined stoichiometry between SD and Hg2+ was 1:1. Notably, SD could be used as molecular switch controlled by EDTA and Hg2+ cyclically. In addition, SD-based test strips were produced which could be used as a convenient and efficient Hg2+ test kits. SD also could qualitatively detect Hg2+ in tap water.