Inorganic perovskite quantum dots (QDs) have attracted great scientific attention in the field of luminescent materials, but the application has been limited by the inferior stability that results from highly dynamic capping ligands. In this work, we use a rare-earth complex to modify perovskite QDs with ligand exchange to realize perovskite functionalization; meanwhile, the stability of perovskite QDs is greatly improved. Density functional theory calculation results show that the adsorption energy of the europium complex to QDs is higher than that with traditional ligands, which provides a thermodynamic basis for stability improvement. Furthermore, the modified QDs exhibit attractive dual-response property, including temperature and pH response ascribed to QDs and europium complexes, respectively. The superior property can be applied to multi-stimuli-responsive optical encoding, which is further capable of enhancing the security of encrypted information. This study not only affords a strategy for the synthesis of highly stable perovskites but also provides a method for the functionalization of perovskites.