Anthocyanins (ACNs) as one category of water-soluble flavonoid pigments are increasingly employed in pH sensing indicator applications for monitoring food freshness. Nevertheless, considering that anthocyanins are sensitive to environmental factors, their practical applications in food industries are still rather limited. In order to improve the stability of anthocyanins and capitalize upon their application in pH-color responsive intelligent packaging, this study aims to graft octanoic aid onto raspberry anthocyanins catalyzed by immobilized Candida antarctica lipase B (Novozymes 435). Structural analyses based on Fourier transform infrared spectroscopy (FTIR), UV–Vis, liquid chromatography-mass spectrometry (LC-MS), and nuclear magnetic resonance (NMR) revealed that octanoic acid was regioselective grafted onto the 6-OH position of its glucoside. The acylation efficiency of C3G by octanoic acid up to 47.1%. The octanoic acid moiety was found to improve lipophilicity, antioxidant activity and stability of C3G. In addition, acylated derivative also maintained the pH-color response characteristics of nature ACNs and exhibited excellent NH 3 response properties. These results indicated that acylated anthocyanins exhibit potential application as intelligent packaging indicator for monitoring food freshness.