In this study, optimization of production parameters influencing melanin production in an economical fruit waste extract was attempted using a garden soil isolate (Bacillus safensis). Taguchi approach was adopted for screening of critical parameters and further optimization was done using a central composite design of response surface methodology (RSM). At optimum conditions (pH 6.84 and Temp 30.7 °C), a significant yield of ∼6.96 mg/mL was observed. Statistical analysis revealed that the experimental results fitted well to the statistical model with model R2 value 0.982. The optimization of process parameters using RSM reported a 15% increase in the pigment yield than average yield obtained from the studied model. The melanin produced was confirmed by UV–visible spectroscopy, FTIR and XRD analysis. Moreover melanin obtained has significant photoprotective, radical scavenging and metal chelating activity. Thus, B. safensis has the potential to be a new source for the production of melanin, which is of industrial interest.