High performance of synthetic colorants detection system has great importance for food safety, yet its quantitative analysis with high sensitivity remains challenging. Herein, core–shell NaGdF4: Yb3+, Er3+@NaYF4 upconversion nanoparticles based solid sensor (UCNPs-SS) is designed and explored in this work, where the detection limit of 0.01 μg mL−1 can be achieved thanks to the effective energy transfer between amaranth and this fluorescence-based sensor. Besides, ratiometric detection technique is employed in this system to ensure the accuracy of the detection, hence, insignificant change of the upconversion luminescence intensity of this UCNPs-SS is observed when the potentially interfering substances are present. Moreover, this UCNPs-SS exhibits good stability for recycled detections. Hence, the precise amaranth detection of three commercial soft drinks and excellent recoveries are achieved via our core–shell UCNPs-SS in this work. These positive results indicate that this proposed fluorescence detect approach not only exhibits excellent sensitivity, but also provides feasibility for practical applications.