Self-healing hydrogels attract broad attention as cell/drug carriers for direct injection into damaged tissues or as bioinks for three-dimensional (3D) printing of tissue-like constructs. For application in 3D printing, the self-healing hydrogels should maintain the steady rheological properties during printing process, and be further stabilized by secondary post-printing crosslinking. Here, a chitosan self-healing hydrogel is developed for injectable hydrogel and printable ink using phenol-functionalized chitosan and dibenzaldehyde-terminated telechelic poly(ethylene glycol). Phenol functionalization of chitosan can introduce unique interaction that allows the hydrogel to possess fast gelling rate, good self-healing ability, and long-range critical gel behavior, as well as secondary visible light-crosslinking capability. The hydrogel is easily pre-formed in a syringe and extruded through a 26-gage needle to produce a continuous and stackable filament. The cell-laden hydrogel is successfully printed into a 3D construct. Moreover, the hydrogel is developed for modular 3D printing, where hydrogel modules (LEGO-like building blocks) are individually printed and assembled into an integrated construct followed by secondary visible light-crosslinking. The versatile phenol-functionalized chitosan self-healing hydrogel will open up numerous potential applications, particularly in 3D bioprinting and modular 3D bioprinting.