Developing advanced luminescent materials that are recognizable under specified conditions provides better opportunity for reliable optical anti-counterfeiting techniques. In this work, to the best of our knowledge, novel GdInO3:Tm,Yb perovskite phosphors with ultrafine sizes and rounded morphologies were successfully synthesized by a facile chemical precipitation route. Two-type perovskites with orthorhombic and hexagonal structures could be obtained by calcining the precursor at 850 and 1100 °C, respectively. Under 980 nm excitation, the two phosphors exhibited cyan-bluish emission at ∼460−565 nm, red emission at 645−680 nm, and near-infrared emission at 770−825 nm arising from 1G4 + 1D2→3H5,6, 3F2,3→3H6, and 3H4→3H6 transitions of Tm3+, respectively, where the hexagonal perovskite phosphor had relatively strong and sharp red emission as well as red-shifted cyan-bluish emission via successive cross relaxations. The Yb3+ sensitizer enhanced the upconversion luminescence via effective Yb3+→Tm3+ energy transfer and the optimal Yb3+ concentrations were 10 at.% for orthorhombic perovskite and 5 at.% for hexagonal one. The upconversion mechanism mainly ascribed to two-photon processes while three-photon was also present. Upon excitation at 254 nm, their down-conversion spectra exhibited broad multibands in the wavelength range of 400−500 nm deriving from combined effects of the defect-induced emission of GdInO3 and the 1D2→3F4 + 4G4→3H6 emissions of Tm3+. The energy transfer from GdInO3 defect level to Tm3+ excitation state was observed for the first time. The unclonable security codes prepared by screen printing from those dual-mode emitting perovskite phosphors were almost invisible under natural light, which had promising potential for anti-counterfeiting application.