In December 2019, the first cases of a novel coronavirus infection were diagnosed in Wuhan, China. Due to international travel and human-to-human transmission, the virus spread rapidly inside and outside of China. Currently, there is no effective antiviral treatment for COVID-19, therefore research efforts are focused on the rapid development of vaccines and antiviral drugs. The SARS-CoV-2 M pro protease constitutes one of the most attractive antiviral drug targets. To address this emerging problem, we have synthesized a combinatorial library of fluorogenic substrates with glutamine in the P1 position. We used it to determine the substrate preferences of the SARS-CoV and SARS-CoV-2 proteases, using natural and a large panel of unnatural amino acids. The results of our work provide a structural framework for the design of inhibitors as antiviral agents or diagnostic tests.