# MHC class I vs class II

> MHC class I shows short peptides from inside the cell to CD8+ T cells; class II shows longer peptides from outside to CD4+ T cells. The difference is easy to state and harder to apply, as HLA typing and the abacavir allele HLA-B*57:01 show.

## How do MHC class I and class II differ?

MHC class I molecules sit on nearly every nucleated cell and display short peptides, usually 8 to 10 amino acids long, to CD8+ T cells. MHC class II molecules sit mainly on dedicated antigen-presenting cells and display longer peptides, usually 13 to 25 residues, to CD4+ T cells. In humans the MHC is called the HLA system (human leukocyte antigen).

That summary is tidy, and it stops being tidy the moment someone needs it. Before a person with HIV is prescribed the drug abacavir, the clinician checks one class I allele, HLA-B\*57:01. In the PREDICT-1 trial, 1,956 patients who had never taken abacavir were randomized to screening or none. HLA-B\*57:01 turned up in 5.6% of them (109 patients), and screening cut immunologically confirmed hypersensitivity from 2.7% to 0%.

The same trial reported a positive predictive value of 47.9%, meaning roughly half of the carriers flagged would have gone on to react. A class I allele, named to its second field, steered a prescription, yet it was a risk marker and not a diagnosis. Reading that result correctly takes the structural logic of the two classes and an understanding of what an HLA allele name encodes.

Three differences separate the classes: the shape of the peptide groove, the route peptides take to reach it, and the T cell co-receptor that docks on the other side. A fourth question decides how most people meet them: which alleles a person carries, and how a laboratory finds out.

## How the peptide grooves differ

Both classes hold a peptide in a groove between two helices, and both bind it through conserved hydrogen bonds to the peptide backbone plus pockets that take particular side chains. The geometry differs. Class I has a single heavy chain with three domains (α1, α2, α3) that partners with a small invariant protein, β2-microglobulin. Class II is a pair of similar chains, α and β, each contributing one immunoglobulin-type domain.

The groove is closed at both ends in class I, by conserved tyrosine residues, which holds peptides to usually 8 to 10 residues. In class II the groove is open at both ends, so peptides of 13 to 25 residues lie across it and extend past the edges. Anchor residues follow the same split: positions 2 and the C-terminal residue in class I, positions 1, 4, 6 and 9 of the core in class II.

The 8 to 10 figure is a tendency, not a wall. Wieczorek and colleagues note that peptides longer than 10 residues have been reported to bind class I. Any tool or filter that hard-codes a length window will miss some real ligands.

![Side-view cartoons of MHC class I, with a nine-residue peptide in a closed groove and CD8 docked on the alpha-3 domain, and MHC class II, with a 13-residue peptide running past an open groove and CD4 docked on the alpha-2 and beta-2 domains](/images/guides/mhc-class-i-vs-ii/domain-layout.webp "**Figure 1. Domain layout of the two classes.** Class I is a heavy chain (α1, α2, α3) with β2-microglobulin (β2m); class II is an α chain (α1, α2) paired with a β chain (β1, β2). CD8 binds class I through α3 and β2m; CD4 binds class II through α2 and β2. Schematic cartoon, not to scale; the helices that flank the groove are not drawn, and each co-receptor is shown touching one domain although it also contacts the other named in its label. Domains and groove geometry after Wieczorek et al. (2017) and Shah et al. (2021).")

## Where the peptides come from

Class I presents fragments of proteins made inside the cell. The heavy chain folds with β2-microglobulin in the endoplasmic reticulum, where the chaperone tapasin helps load high-affinity peptides generated from the cell's own proteins. Class II folds with a placeholder protein, the invariant chain, and travels to late endosomal compartments. There proteases trim the invariant chain to a short fragment (CLIP) that stays in the groove until HLA-DM swaps it for a peptide from material the cell has taken up.

The result is that class I mostly reports on what the cell is making, whereas class II mostly reports on what the cell has swallowed. Tapasin and HLA-DM both act as peptide editors that favor stable, high-affinity complexes, an unexpected parallel between the two pathways.

![Two rows of four stages: class I peptides from the cell's own proteins are loaded in the endoplasmic reticulum with tapasin and shown to CD8+ T cells; class II peptides from material taken up are loaded in a late endosome after HLA-DM swaps out CLIP and shown to CD4+ T cells](/images/guides/mhc-class-i-vs-ii/loading-pathways.webp "**Figure 2. Where each class gets its peptide.** Class I loads peptides from the cell's own proteins in the endoplasmic reticulum; class II loads peptides from taken-up material in late endosomal compartments, where HLA-DM replaces CLIP. Schematic. Source: Wieczorek et al. (2017), Roche and Furuta (2015).")

## Which cells and T cells use each class

Peptide-class I complexes can be shown by any nucleated cell and are recognized by CD8+ T cells, which are cytotoxic. Peptide-class II complexes appear constitutively on professional antigen-presenting cells (dendritic cells, B cells, macrophages and thymic epithelial cells) and are recognized by CD4+ helper T cells.

The co-receptor adds a second contact. CD8 binds class I through the membrane-proximal α3 domain and β2-microglobulin, whereas CD4 binds class II through the α2 and β2 domains. Each T cell subset therefore carries the co-receptor that matches the class it reads.

  <caption><strong>Table 1. MHC class I and class II compared.</strong> Peptide lengths are typical ranges, not limits. Sources: Wieczorek et al. (2017), Shah et al. (2021), Roche and Furuta (2015).</caption>
  <thead>
    <tr>
      <th scope="col">Feature</th>
      <th scope="col">MHC class I</th>
      <th scope="col">MHC class II</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Chains</td>
      <td>One heavy chain (α1, α2, α3) plus β2-microglobulin</td>
      <td>An α chain and a β chain, one Ig-type domain each</td>
    </tr>
    <tr>
      <td>Groove</td>
      <td>Closed at both ends</td>
      <td>Open at both ends</td>
    </tr>
    <tr>
      <td>Typical peptide length</td>
      <td>8 to 10 residues</td>
      <td>13 to 25 residues</td>
    </tr>
    <tr>
      <td>Main peptide source</td>
      <td>Proteins made inside the cell, loaded in the endoplasmic reticulum</td>
      <td>Material taken up by the cell, loaded in endosomal compartments</td>
    </tr>
    <tr>
      <td>Peptide editor</td>
      <td>Tapasin</td>
      <td>HLA-DM</td>
    </tr>
    <tr>
      <td>Expressed on</td>
      <td>Nearly all nucleated cells</td>
      <td>Dendritic cells, B cells, macrophages, thymic epithelial cells</td>
    </tr>
    <tr>
      <td>T cell and co-receptor</td>
      <td>CD8+ cytotoxic T cells</td>
      <td>CD4+ helper T cells</td>
    </tr>
    <tr>
      <td>Classical human genes</td>
      <td>HLA-A, HLA-B, HLA-C</td>
      <td>HLA-DR, HLA-DP, HLA-DQ</td>
    </tr>
  </tbody>

## HLA genes and allele names

The classical class I proteins are encoded by the genes HLA-A, HLA-B and HLA-C, and the classical class II proteins by HLA-DR, HLA-DP and HLA-DQ, all of them highly polymorphic. A person carries two versions of each gene, one from each parent, and the versions differ from person to person. That variation changes the groove, and therefore which peptides each person's molecules can hold.

The IPD-IMGT/HLA database catalogs each named variant. In release 3.66.0 (October 14, 2026), its allele list holds 9,457 entries for HLA-A, 11,328 for HLA-B and 9,580 for HLA-C, together 30,365 class I entries from the three classical genes. The class II beta genes are smaller: 4,056 entries for DRB1, 3,161 for DQB1 and 3,209 for DPB1. These are catalog entries, not the number of variants common in any population.

An allele name packs in four levels of detail. In HLA-A\*02:01:01:01, the letters name the gene and the asterisk marks a molecularly defined allele. The first field (02) is the allele group, which historically tracks the serological type. The second field (01) identifies a specific protein sequence. The third field marks differences that leave the protein unchanged, and the fourth marks differences in non-coding regions.

![HLA-A*02:01:01:01 split into the gene HLA-A, allele group 02, protein sequence 01, synonymous change 01 and non-coding change 01, with the first two fields marked as the working name](/images/guides/mhc-class-i-vs-ii/allele-name.webp "**Figure 3. Reading an HLA allele name.** The first two fields name the protein and are the level most prediction tools ask for. Source: Feng et al. (2026).")

For almost all uses, the first two fields are the working name: HLA-A\*02:01 and HLA-B\*57:01 are two different proteins, and a prediction tool that asks for an allele wants this level.

## How HLA typing works

HLA typing determines which alleles a person carries. It was originally done serologically, with antibodies against HLA antigens on cells, and has largely moved to DNA-based methods that read the genes directly.

Resolution matters as much as method. Low-resolution typing identifies the first field and is usually enough for solid organ transplantation, blood transfusion support and some drug-risk and disease-association tests. High-resolution typing resolves the protein-level field as well and is used mainly for bone marrow and stem cell transplantation.

  <caption><strong>Table 2. Common molecular HLA typing methods.</strong> Descriptions follow the review by Feng et al. (2026).</caption>
  <thead>
    <tr>
      <th scope="col">Method</th>
      <th scope="col">What it does</th>
      <th scope="col">Known limit</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>PCR-SSP (sequence-specific primers)</td>
      <td>Amplifies only the alleles that match primers, so a product means the allele is present</td>
      <td>Covers a limited set of alleles per reaction; often used to settle problems other methods leave open</td>
    </tr>
    <tr>
      <td>PCR-SSO (sequence-specific oligonucleotide probes)</td>
      <td>Hybridizes amplified DNA to a panel of probes, often on a Luminex platform</td>
      <td>With so many alleles, can return ambiguous results that need follow-up testing</td>
    </tr>
    <tr>
      <td>Sequencing-based typing (Sanger)</td>
      <td>Reads the DNA sequence of the amplified gene</td>
      <td>Limited scalability</td>
    </tr>
    <tr>
      <td>Next-generation sequencing</td>
      <td>Reads many DNA fragments in parallel; deep coverage helps assign heterozygous positions</td>
      <td>Short-read platforms; described as the gold standard in many clinical laboratories for stem cell transplant matching</td>
    </tr>
  </tbody>

The expansion of the allele database is itself a consequence of NGS, which has made it practical to find rare and novel alleles at scale.

## Why HLA typing matters

In transplantation, typing decides who can donate to whom. For unrelated stem cell donors, the European transplant society EBMT defines a full match as 10/10: both copies of HLA-A, -B, -C, -DRB1 and -DQB1 at high resolution. The US registry body CIBMTR uses an 8/8 definition that leaves out -DQB1, and more than 96% of 8/8 pairs are also 10/10, so the two definitions largely coincide. Siblings have only a 25% chance of sharing the same HLA genes from both parents.

In drug safety, certain alleles mark patients at risk of severe reactions. HLA-B\*57:01 is the abacavir example above. Other associations in the same review include HLA-B\*15:02 with carbamazepine-induced Stevens-Johnson syndrome and toxic epidermal necrolysis, and HLA-B\*58:01 with allopurinol hypersensitivity.

In immunotherapy and vaccine design, the allele sets which peptides can be displayed at all. A peptide that is a perfect epitope for one person's HLA-A\*02:01 may never be presented in someone whose alleles have different grooves. That is why predictions are always made for a named allele.

## How class I and class II presentation is predicted

Binding of a peptide to the HLA molecule is the most selective step of the pathway, so predicting it is a standard first filter for epitopes. NetMHCpan-4.1 and NetMHCIIpan-4.0 do this for class I and class II respectively, trained on both binding-affinity data and mass spectrometry of ligands eluted from cells.

Binding is not recognition, and a bound peptide may still provoke no T cell response. TLimmuno2 addresses the next step for class II: it is a transfer-learning model that predicts whether an epitope-MHC class II complex elicits a T cell response, using binding-affinity data to compensate for the scarcity of immunogenicity data. The ProteinIQ version runs for a chosen HLA class II allele and takes peptides of 13 to 21 residues; its page documents the details.

- [TLimmuno2](/app/tlimmuno2): predict whether a class II peptide triggers a CD4+ T cell response for a chosen HLA allele.
- [DeepImmuno](/app/deepimmuno): predict the immunogenicity of a class I peptide for a supported HLA-A, -B or -C allele.

## Frequently asked questions

### What is the main difference between MHC class I and class II?

Class I presents peptides of mostly intracellular origin, usually 8 to 10 residues, to CD8+ T cells and is found on nearly all nucleated cells. Class II presents peptides from material the cell has taken up, usually 13 to 25 residues, to CD4+ T cells and is found on antigen-presenting cells.

### What is HLA?

HLA, human leukocyte antigen, is the human name for the MHC. The classical class I genes are HLA-A, -B and -C, and the classical class II genes are HLA-DR, -DP and -DQ.

### What does HLA-A\*02:01 mean?

HLA-A is the gene, 02 is the allele group and 01 identifies the protein sequence. Two more fields can follow for synonymous and non-coding differences.

### How is HLA typing done?

Modern typing reads the HLA genes, using PCR with sequence-specific primers or probes, Sanger sequencing or next-generation sequencing. Low-resolution results suffice for many solid organ or drug-risk questions, while stem cell transplantation needs high resolution.

### Does a positive HLA-B\*57:01 test mean a person will react to abacavir?

Not necessarily. In PREDICT-1, a positive result had a positive predictive value of 47.9% for immunologically confirmed hypersensitivity, while a negative result had a negative predictive value of 100%.
