Advanced encryption and anti-counterfeiting methods are urgently needed to protect valuable documents, merchandise and pharmaceuticals. In this research, dual-emissive carbon dots (d-CDs) featuring pH-responsive behavior are fabricated by using spirulina as precursor via a facile hydrothermal method. The d-CDs display two distinctive photoluminescence emission peaks at 456 and 677 nm under the excitation of 380 nm. Interestingly, the fluorescence color of d-CDs can be dynamically adjusted by modifying the pH of the system. Complex programmable red and blue luminous inks can be prepared from the d-CDs nanocomposite to protect the important data. Using triethylamine (TEA) and hydrochloric acid (HCl) as encryption and decryption reagents, the emission color of vital data can be switched repeatedly, demonstrating high potential of this safety inks for dynamic anti-counterfeiting, multiple data encryption-decryption as well as reversible data coding under UV light. Moreover, the intelligent two-channel sensor modified by chitosan (CN) CDs@CN realizes the reversible and synchronous conversion of luminescent color and sol-gel at different pH values. A logic gate system is final designed to dynamically monitor such interesting phenomenon. This work provides an efficient method for the construction of dual-emission CDs for dynamic anti-counterfeiting applications. Furthermore, the utilization of renewable and low-cost green biomass resources will have a positive effect on the sustainable development of CDs and their applications.