Current clinical vitreous substitutes employed in vitrectomy and retinal surgery are frequently associated with complications such as emulsification, vitreous opacities, and inflammation, highlighting the urgent demand for safer biomaterial alternatives. Herein, we report a purely zwitterionic polymer hydrogel for vitreous replacement, which is constructed entirely from a zwitterionic monomer (carboxybetaine ureido acrylate) without any covalent cross-linkers or non-zwitterionic segments, and self-crosslinked via multi-valent hydrogen bonding and dipole-dipole interactions. The supramolecular network of poly(carboxybetaine ureido acrylate) (PCBUIA) hydrogels exhibits pronounced shear-thinning properties for smooth injection and rapid self-healing to restore mechanical integrity once the shear force is removed. The PCBUIA hydrogels also match native vitreous in density (1.016–1.021 g/cm3), refractive index (1.3359–1.3389) and transmittance (> 90%), while exhibiting comparable viscoelastic behavior. Moreover, the zwitterionic hydration layer confers PCBUIA hydrogels with ultralow protein adsorption and markedly suppresses cell attachment; notably, it cannot provoke any foreign-body reaction or fibrotic capsule formation, demonstrating an outstanding biocompatibility. After one month of implantation in rabbit eyes, the PCBUIA hydrogels maintained optical transparency, preserved native retinal morphology, and did not cause elevated intraocular pressure and inflammatory response. These findings demonstrate the potential of purely zwitterionic polymer hydrogels as vitreous substitutes. However, further long-term in vivo studies are required to evaluate their stability and functional performance.