The world is experiencing an unprecedented coronavirus disease 2019 (COVID-19) pandemic caused by severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2). SARS-CoV-2 spike protein-based vaccines are currently the main preventive agent to fight against the virus. However, several variants with extensive mutations in SARS-CoV-2 spike proteins have emerged. Some of these variants exhibited increased replication, higher transmission and virulence, and were partially resistant to antibody neutralization from natural infection or vaccination. With over 130 million confirmed cases and widespread vaccination around the globe, the emergence of new escape SARS-CoV-2 variants could be accelerated. New therapeutics insensitive to mutations are thus urgently needed. Here we have developed an inhibitor based on SARS-CoV-2 spike protein that potently reduced pseudovirus infectivity by limiting the level of SARS-CoV-2 spike proteins on virion envelope. Most importantly, the inhibitor was equally effective against other coronavirus spike proteins that shared as low as 35% amino-acid sequence identity, underscoring its extreme tolerance to mutations. The small-sized inhibitor would also allow simple delivery by, for instance, nasal spray. We expect the inhibitor reported here to be an invaluable aid to help end COVID-19 pandemic. Furthermore, the use of a partial native sequence or its homologues to interfere with the functions of the native protein represents a novel concept for targeting other viral proteins in combating against important viral pathogens.