Inorganic lead-halide perovskite nanocrystals (NCs) are an exciting class of luminescent materials with high defect tolerance and broad spectral tunability, but such NCs are vulnerable to degradation under ambient conditions. Here, we report a class of modular zwitterion-functionalized isopropyl methacrylate polymers designed to stabilize a wide variety of perovskite NCs of different compositions, while also enabling processing in green solvents. Specifically, we report polymers in which the zwitterion spacing is tuned to accommodate the different lattice parameters of CsPb(Cl1-xBrx)3 and CsPbI3 NCs, and we report partially fluorinated polymers prepared to accommodate the needs of infrared-emitting NCs. We show that as-synthesized CsPbBr3, CsPbI3, and Yb3+:CsPbCl3 NCs are easily transferred into these zwitterionic polymers via a simple ligand-exchange procedure. These NC/polymer composites were then cast into thin films that showed substantially improved photoluminescence (PL) and stability compared with more conventional NC/polymer films. Specifically, CsPbBr3 and CsPbI3 NCs in films of their appropriately designed polymers had PL quantum yields of ~90% and ~80%, respectively. PL quantum yields decreased under continuous illumination, but self-healed completely after dark storage. We also found that all the NC compositions studied here maintain their PL quantum yields in NC/polymer composite films even after 1 year of ambient storage. These encouraging results demonstrate the utility of such modular zwitterion-functionalized polymers for hosting specific perovskite NCs, potentially opening avenues for robust new photonic applications of this important class of NCs.