The aim of the present study is to optimize the production of antifungal metabolites produced by Bacillus subtilis V26 and to evaluate its efficiency in suppression Botrytis cinerea, the main cause of tomato fruit rot disease. Different media were tested for antifungal metabolite production, including chitosanase, by V26. Both of antifungal and chitosanase activities were highly produced in M13 medium, which was selected for medium optimization by using a three-level three-factor Box Behnken design. The optimum antifungal metabolite production (6200AU/mL) was achieved at 30g/L soybean, 200g/L potato extract and 18.5mL culture medium volume, and represented more than 93% improvement biofungicide production over the basal medium. The V26 culture supernatant showed a strong growth inhibition activity against B. cinerea at low percentage (9%), causing various morphological mycelia changes. The antifungal activity of V26 was relatively stable to temperature, resistant to proteases and UV treatments. Treatment of tomato fruits by V26 significantly reduced by 79% postharvest decay caused by B. cinerea. B. subtilis V26 could be a potential biological agent for the protection of tomato against postharvest disease. High production of chitosanase and antifungal metabolites by B. subtilis V26 may be useful for various industrial and agricultural applications.