Alternative or surrogate fuel is a carburant made up of a reduced number of constituents that emulate the characteristics and performance of a target fuel which may contain more than a thousand compounds. In order to overcome the composition complexity and permit the simulation of kinetic models, an optimization of the surrogate fuel composition is necessary to reproduce physical and chemical properties of a target fuel. The main objective of the present research is to optimize a formulation for an alternative fuel that emulates a target fossil diesel (B0), and an obtained biodiesel (B100) from a transesterification of cooking vegetable oil. To enhance the application of biodiesel as an alternative solution to depleting fossil fuel, mixtures of diesel and several percentages of biofuel are also considered as target fuels, considering 5%, 10%, 20%, 50% and 80% of biodiesel, denoted respectively: B5, B10, B20, B50 and B80. The target properties considered in this work are the density at 15 °C, the viscosity at 40 °C and the cetane number using a palette of 18 components selected from previous works. The numerical method of the Generalized Reduced Gradient (GRG) is used to optimize the defined objective function. The results obtained showed that the optimized surrogates for fossil diesel, biodiesel and their blending agree well with target properties and all the optimized alternatives are composed of only the same three constituents, namely: 1-methylnaphthalene, isocetane and neicosane.