The promiscuous nature of T-cell receptors (TCRs) allows T cells to recognize a large variety of pathogens, but makes it challenging to understand and control T-cell recognition. Existing technologies provide limited information about the key requirements for T-cell recognition and the ability of TCRs to cross-recognize structurally related elements. Here we present a 'one-pot' strategy for determining the interactions that govern TCR recognition of peptide-major histocompatibility complex (pMHC). We measured the relative affinities of TCRs to libraries of barcoded peptide-MHC variants and applied this knowledge to understand the recognition motif, here termed the TCR fingerprint. The TCR fingerprints of 16 different TCRs were identified and used to predict and validate cross-recognized peptides from the human proteome. The identified fingerprints differed among TCRs recognizing the same epitope, demonstrating the value of this strategy for understanding T-cell interactions and assessing potential cross-recognition before selection of TCRs for clinical development.