Several efforts have been made to estimate the prevalence of different types of antibiotic resistance in different regions of Nigeria. The study investigated the prevalence of Klebsiella pneumoniae encoding genes for CTX-M, TEM, and SHV-1 extended-spectrum beta-lactamases (ESBL) enzymes isolated from urine samples of non-hospitalized patients with suspected UTI in Lagos State, Nigeria. A 4-month retrospective study, spanning from May 2023 to August 2023, was conducted. K. pneumoniae was isolated from urine samples using standard microbiological methods. The modified Kirby-Bauer disc diffusion method was used to test for antibiotic susceptibility, and Clinical and Laboratory Standard Institute (CLSI) guidelines were followed for interpretation. The double-disk synergy method was used to confirm the phenotypic identity of ESBL producers, and the results were interpreted in accordance with CLSI guidelines. The phenotypic method was utilized for ESBL screening, employing the standard disk diffusion method. The CTX-M ESBL gene, TEM gene, and SHV gene were found using multiplex PCR. Results revealed that 41 K. pneumoniae isolates were resistant to third-generation Cephalosporins; the isolates showed resistance to ceftazidime in 100% of cases and ceftriaxone in 80.49% of cases respectively. It was determined that 8 (19.51%) of the isolates produced ESBL. Among Klebsiella isolates, the frequencies of the SHV, TEM, and CTX-M genes were 31 (75.61%), 4 (9.76%), and 10 (24.39%), in that order. Four isolates (9.67%) had the SHV, TEM, and CTX-M genes, while eight (19.51%) of the isolates possessed both the SHV and CTX-M genes. This investigation demonstrates high frequency, wide range of patterns and coexistence of ESBL genes in K. pneumoniae isolates from outpatient UTI patients. Although several phenotypic tests have been used for ESBL detection, testing directly for the presence of ESBL genes is always more accurate. The majority of the isolates of Klebsiella pneumoniae ESBL producers had the SHV gene identified.