A new fluorescent turn-off–on sensor was developed based on the the rhodamine B derivatives (RBP) modified UCNPs to detect Cu2+ and pyrophosphate (PPi).