Although most activating mutations of epidermal growth factor receptor (EGFR)-mutant non-small cell lung cancers (NSCLCs) are sensitive to available EGFR tyrosine kinase inhibitors (TKIs), a subset with alterations in exon 20 of EGFR and HER2 are intrinsically resistant and lack an effective therapy. We used in silico, in vitro, and in vivo testing to model structural alterations induced by exon 20 mutations and to identify effective inhibitors. 3D modeling indicated alterations restricted the size of the drug-binding pocket, limiting the binding of large, rigid inhibitors. We found that poziotinib, owing to its small size and flexibility, can circumvent these steric changes and is a potent inhibitor of the most common EGFR and HER2 exon 20 mutants. Poziotinib demonstrated greater activity than approved EGFR TKIs in vitro and in patient-derived xenograft models of EGFR or HER2 exon 20 mutant NSCLC and in genetically engineered mouse models of NSCLC. In a phase 2 trial, the first 11 patients with NSCLC with EGFR exon 20 mutations receiving poziotinib had a confirmed objective response rate of 64%. These data identify poziotinib as a potent, clinically active inhibitor of EGFR and HER2 exon 20 mutations and illuminate the molecular features of TKIs that may circumvent steric changes induced by these mutations.