The increasing demands of agriculture and the food market have resulted in intensive agricultural practices using synthetic fertilizers to maximize production. However, significant efforts have been made to implement more environmentally friendly procedures, such as composting, to overcome the adverse impact of these invasive practices. In the terms of this research, composting was applied to the production of two biofertilizers, using onion and mushroom by-products as raw materials respectively. The main purposes of this work were to identify the compounds that pass from the raw materials to the final products (onion-based and mushroom-based), as well as the characterization of the chemical profile of these final products following suspect and non-target screening workflows via UPLC-qToF-MS. Overall, 14 common compounds were identified in the onion and its final product, while 12 compounds were found in the mushroom and its corresponding product. These compounds belong to fatty acids, organic acids, and flavonoids, which could be beneficial to plant health. The determination of parameters, such as the pH, conductivity, organic matter, nitrogen content, and elemental analysis, were conducted for the overall characterization of the aforementioned products.