Mucus is a porous biopolymer matrix that coats all wet epithelia in the human body and serves as the first line of defense against many pathogenic bacteria and viruses. However, under certain conditions viruses are able to penetrate this infection barrier, which compromises the protective function of native mucus. Here, we find that isolated porcine gastric mucin polymers, key structural components of native mucus, can protect an underlying cell layer from infection by small viruses such as human papillomavirus (HPV), Merkel cell polyomavirus (MCV), or a strain of influenza A virus. Single particle analysis of virus mobility inside the mucin barrier reveals that this shielding effect is in part based on a retardation of virus diffusion inside the biopolymer matrix. Our findings suggest that purified mucins may be used as a broad-range antiviral supplement to personal hygiene products, baby formula or lubricants to support our immune system.