A precursor of a β-peptide derivative transforms into a hydrogelator and forms supramolecular hydrogels upon phosphatase-catalyzed dephosphorylation. This new strategy works in vitro and in vivo (see image). The enzymatic hydrogelation in vivo indicates that the β-peptide-based hydrogel exhibits a longer lifetime than that of α-peptide hydrogel in a subcutaneous environment. Such an excellent in vivo stability renders the β-peptide-based hydrogel as a potential candidate for biomedical applications.