The entry process of viruses into host cells is complex and involves stable but transient multivalent interactions with different cell surface receptors. The initial contact of several viruses begins with attachment to heparan sulfate (HS) proteoglycans on the cell surface, which results in a cascade of events that end up with virus entry. The development of antiviral agents based on multivalent interactions to shield virus particles and block initial interactions with cellular receptors has attracted attention in antiviral research. Here, we designed nanogels with different degrees of flexibility based on dendritic polyglycerol sulfate to mimic cellular HS. The designed nanogels are nontoxic and broad-spectrum, can multivalently interact with viral glycoproteins, shield virus surfaces, and efficiently block infection. We also visualized virus–nanogel interactions as well as the uptake of nanogels by the cells through clathrin-mediated endocytosis using confocal microscopy. As many human viruses attach to the cells through HS moieties, we introduce our flexible nanogels as robust inhibitors for these viruses.