The sensor HNHCB (3-hydroxy-naphthalene-2-carboxylic acid (4-cyano-benzylidene)-hydrazide) comprises a -CONH- group, -OH group, -CHN- linkage and an electron withdrawing -CN group that can act as both an anion (fluoride) and a cation (copper) sensor by two distinct output modes. It can detect fluoride by naked eye color change and copper by fluorescence enhancement. Interestingly, the nature of the substituent in HNHCB has an effect on the selectivity. The detection limit can be as low as 160 nM for Cu2+ and 1.3 μM for F-. DFT calculations have been performed to demonstrate the structure of HNHCB and its copper complex. Biological applications of HNHCB have been evaluated in HEK 293 and it was found to exhibit membrane permeability for the detection of Cu2+. The sensor HNHCB is also sensitive towards fluoride in commercially available toothpaste. © The Royal Society of Chemistry 2016.