Toxin antitoxin system is a regulatory system that antitoxin inhibits the toxin. We aimed to determine the role of TA loci in biofilm formation in K. pneumoniae clinical and environmental isolates; also inhibition of biofilm formation by Peganum harmala. So, 40 K. pneumoniae clinical and environmental isolates were subjected for PCR to determine the frequency of mazEF, relEB, and mqsRA TA loci. Biofilm formation assay subjected for all isolates. Then, P. harmala was tested against positive biofilm formation strains. Our results demonstrated that relBE TA loci were dominant TA loci; whereas mqsRA TA loci were negative in all isolates. The most environmental isolates showed weak and no biofilm formation while strong and moderate biofilm formation observed in clinical isolates. Biofilm formations by K. pneumoniae in 9 ug/ml concentration were inhibited by P. harmala. In vivo study suggested to be performed to introduce Peganum harmala as anti-biofilm formation in K. pneumoniae.