BackgroundSalviaL. (Lamiaceae) found in almost all countries in temperate and tropical regions. BothS. aegyptiacaL. andS. lanigeraPoir. have a rather wide distribution in Egypt (Mediterranean region, Gebel Elba and nearly the whole Sinai).Salviaspecies showed antibacterial and antifungal activities against several groups of food microorganisms and pathogens, so they are considered as a natural foods preservatives.AimInvestigate the phytochemical profiles ofS. aegyptiaca&S. lanigeracollected from their natural habitats in Egypt and test the antimicrobial activities of both species against some bacteria and fungi pathogenic strains.MethodologyIn the present study,S. aegyptiacaandS. lanigerawere collected from their natural habitat. Total phenolics and flavonoids contents were measured for aerial parts of bothSalviaspp.. The separation and identification of the pure active materials of bothSalviasp. by using LC-MS system (UHPLC-TSQ Quantum Mass Spectrometer). The antimicrobial activities of the ethanol, water and benzene extracts of the two species were tested against different pathogenic strains and compared with the standard antimicrobial drug (Gentamycin). Antimicrobial activity was determined by using agar disk diffusion method.ResultsThe phenolics content inS. lanigera132.61±6.23 mg/g andS. aegyptiaca125.19±4.97 mg/g, while the flavonoids content was 35.68±1.84 and 40.63±2.11 mg/g, respectively. Through LC-MS analysis, two compounds were detected in both species; heptadecanoyl coenzyme A, that the highest percentage (13.5%) inS. aegyptiacaand (11.5 %) inS. lanigera. Oenin, in a peak area of 3.1% inS. aegyptiacaand 1.2 % inS. lanigera. Ethanol extract of the two species had the most inhibitory effect against all tested microorganisms that exceeded the effect of the standard, except forMucor reinelloidswhich was more sensitive to the water extract. Moreover,S. lanigeraethanol extract showed larger inhibition zone thanS. aegyptiacain all tested microorganisms except forPseudomonas aeruginosa.ConclusionThis study shows the important phytochemicals that improve the antibacterial and antifungal activities ofSalvia aegyptiacaandS. lanigera.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12870-023-04341-5.