Oligosaccharides displayed at cell surfaces have important biological functions — such as controlling the entry of viruses — but a full understanding of this behaviour requires the synthesis of such compounds, which remains challenging. Here, two synthetic octasaccharides were shown to have remarkably similar inhibition of herpes simplex virus type 1 infection of cell cultures to the natural oligosaccharide identified in enzymatic studies.