Plant growth promoting rhizobacteria offer an effective and eco-sustainable solution to protect crops against phytopathogens. In the present study, Bacillus safensis STJP (NAIMCC-B-02323) from the rhizospheric soil of Stevia rebaudiana showed strong biocontrol activity against phytopathogen, Alternaria alternata. B. safensis STJP produced antifungal volatile organic compounds (AVOC). In the presence of AVOC, there was no conidia germination, mycelium growth was inhibited, and hyphae ruptured as observed by scanning electron microscopy (SEM). When mycelium of the fungus from bacterial treated plate was transferred into fresh potato dextrose agar plate, A. alternata could not grow. Extracted AVOC from B. safensis STJP were identified by thin-layer chromatography (TLC), fourier-transform-infrared spectroscopy (FT-IR) and gas-chromatography-mass spectrometry (GC-MS). In total 25 antifungal metabolites were identified by GC-MS analysis having alcohol, alkane, phenol, alkyl halide and aromatic compounds. Five compounds (phenol, 2,4-bis (1,1-dimethylethyl)-, 3-hexadecanol, pyrrolo(1,2-a)pyrazine-1,4-dione, 5,10-diethoxy-2,3,7,8-tetrahydro-1H,6H-dipyrrolo(1,2-a:1',2'-d)pyrazine and hexadecanoic acid) completely inhibited the mycelium growth, controlling spore formation and conidia germination of A. alternata. This study concluded that AVOC producing B. safensis can be used as a green-fungicide against A. alternata. Bacterial metabolites could pave the way for the development of next generation biopesticide. This can be a reliable technology to enhance the quality and reliability of biopesticides.