Based on degradable pH-responsive hydrogel, we report on an enhanced three-dimensional data encryption security technique in which a pH value is used for information manipulation. Featuring three types of states upon the pH value variation, namely, shrinkage, expansion and degradation, the hydrogel renders a limited pH value window as the “key” for information decryption. The pH-dependent shrinkage-to-expansion conversion of the hydrogel leads to a threshold pH value for retrieving the recorded data, whilst the degradability of the hydrogel, which can be tuned by adjusting the composition ratio of PEGDA/AAc, gives rise to a second threshold pH value for irreversibly sabotaging the retrieved data. Pre-doping silver ions in the hydrogel facilitates explicit recording and reading of binary data in forms of three-dimensional silver patterns through photoreduction and scattering, respectively, with a femtosecond laser. By accurately matching the vertical spacing of the encoded silver nanopatterns with the diffraction-limited focal depth of the decryption microscope, we can tune the pH value to encrypt and retrieve information recorded in layers and set a critical pH value to smash encoded information, which proves a highly secured 3D data encoding protocol. This strategy can effectively enrich data encryption techniques, vastly enhancing data security within unattained chemical dimensions.