Antigen recognition by the T-cell receptor (TCR) is a hallmark of the adaptive immune system. When the TCR engages a peptide bound to the restricting major histocompatibility complex molecule (pMHC), it transmits a signal via the associated CD3 complex. How the extracellular antigen recognition event leads to intracellular phosphorylation remains unclear. Here, we used single-molecule localization microscopy to quantify the organization of TCR–CD3 complexes into nanoscale clusters and to distinguish between triggered and nontriggered TCR–CD3 complexes. We found that only TCR–CD3 complexes in dense clusters were phosphorylated and associated with downstream signaling proteins, demonstrating that the molecular density within clusters dictates signal initiation. Moreover, both pMHC dose and TCR–pMHC affinity determined the density of TCR–CD3 clusters, which scaled with overall phosphorylation levels. Thus, TCR–CD3 clustering translates antigen recognition by the TCR into signal initiation by the CD3 complex, and the formation of dense signaling-competent clusters is a process of antigen discrimination.