Endoplasmic reticulum aminopeptidase 2 (ERAP2) is a protein that in humans is encoded by the ERAP2 gene. ERAP2 is part of the M1 aminopeptidase family. It is expressed along with ERAP1 in the endoplasmic reticulum (ER). In the ER, both enzymes help process and present antigens by trimming the ends of precursor peptides. This creates the optimal pieces for display by Major Histocompatibility Complex (MHC) class I molecules.