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 (bla TEM, bla PER, bla CTX-M, bla VEB, and bla SHV); and class D (bla OXA-48), class B (bla VIM, bla NDM, and bla IMP), and class A (bla KPC and bla GES) 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 bla TEM, bla SHV, bla CTX-M, and bla OXA-48 genes, respectively. Six isolates (11.5%) were positive for bla NDM gene. In contrast, no isolates were positive for the presence of bla KPC, bla IMP, and bla VIM. 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.