Long-term excessive intake of nitrite (NO2−) poses a great threat to human health, needing a simple and fast method to detect NO2−in food. Herein, viaa simple and feasible strategy, Mn/Yb/Er triple-doped CeO2nanozyme (Mn/Yb/Er/CeO2) was synthesized for highly sensitive ratiometric detection of nitrite. By doping Mn, Yb, Er into CeO2lattice structure, Mn/Yb/Er/CeO2nanozyme showed enhanced oxidase-like activity, obtaining a higher density of oxygen vacancy and a higher ratio of Ce3+to Ce4+than that of CeO2. The 3,3′,5,5′-tetramethylbenzidine (TMB) can be effectively oxidized by Mn/Yb/Er/CeO2to produce the oxidized TMB (oxTMB), showing a significant absorption signal at 652 nm. Additionally, nitrite can react with oxTMB to produce yellow diazotized oxTMB, which is accompanied by an elevated absorption signal at 445 nm and a decreased absorption signal at 652 nm. Thus, based on the oxidase-mimetic activity of Mn/Yb/Er/CeO2and the diazotization reaction between NO2−and oxTMB, a ratiometric colorimetric assay was established for NO2−detection in food. Furthermore, by integrating Mn/Yb/Er/CeO2with a smartphone, a colorimetric smartphone-sensing platform was successfully fabricated for visualization and quantitative detection of NO2−. Notably, this two-detection mode showed excellent sensitivity, selectivity, reliability and practicability in monitoring the NO2−in real samples, impling its great potential for food safety.