The current study assessed the detection of virulence genes and drug resistance among Klebsiella pneumoniae isolates from Iran. During 2018 to 2020, 52 K. pneumoniae isolates were obtained from patients at Iran hospitals. By disk diffusion method, the antimicrobial susceptibility of K. pneumoniae isolates was assessed, and ESBL-producing K. pneumoniae isolates were detected by CDDT method. PCR analysis was done to detect virulence genes (iucB, iutA, iroN, kfu, allS, fimH, ybtS, mrkD, and entB); ESBL-encoding genes (blaTEM, blaPER, blaCTX-M, blaVEB, and blaSHV); and class D (blaOXA-48), class B (blaVIM, blaNDM, and blaIMP), and class A (blaKPC and blaGES) carbapenemase genes. Among all isolates, 84.6%, 13.5%, and 1.9% isolates were multidrug-resistant (MDR), extensively drug-resistant (XDR), and pandrug-resistant (PDR), respectively. Also, 84.6% were ESBL-producing and 71.2%, 53.8%, 40.4%, and 9.6% of all isolates were carrying blaTEM, blaSHV, blaCTX-M, and blaOXA-48 genes, respectively. Six isolates (11.5%) were positive for blaNDM gene. In contrast, no isolates were positive for the presence of blaKPC, blaIMP, and blaVIM. Virulence factor genes including iucB, iutA, iroN, kfu, allS, fimH, ybtS, mrkD, and entB were carried by 24%, 46.2%, 25%, 11.5%, 17.3%, 86.5%, 75%, 88.5%, and 100% isolates, respectively. This study evaluated the distribution and prevalence of virulence factor genes among K. pneumoniae isolates. The treatment of these infections is challenging due to the existence of particular virulence factors and the rise of antibiotic resistance. Therefore, the current study accentuates the necessity of finding new and efficient solutions for stopping the increase of antibiotic resistance.