In this study, a sustainable and economical acid heterogeneous catalyst derived from onion peels ( Allium cepa L .) was developed through a direct sulfonation process to enhance sustainable biodiesel manufacturing via an esterification process using palm oil refining by-products as the primary feedstock. The developed catalyst OPACL-(OPT)-SO 3 H, was characterized using various analytical techniques, including XRD, SEM-EDX, FT-IR, TGA/DTA, DLS, BET, and Boehm titration. The results demonstrated an amorphous carbon structure with a high total acid density of 8.12 mmol/g, achieved under sulfonation conditions with 18.658 mol/l concentrated sulfuric acid at 70 degrees C for 8 h. Furthermore, under optimal esterification reaction conditions, the OPACL-(OPT)-SO 3 H catalyst exhibited excellent catalytic activity, achieving a maximum FFA conversion of 98.9 % after 3 h, with a catalyst amount of 5 wt% and a PFAD/methanol molar ratio of 1:15 at 80 degrees C. Moreover, the activation energy for the esterification reaction was determined to be 35.4 kJ/mol. Thermodynamically, the reaction was found to be endothermic and non-spontaneous. The catalyst demonstrated exceptional stability, capable of being regenerated in four consecutive cycles. An exhaustive analysis of the synthesized biodiesel ' s physicochemical properties confirmed adherence to the internationally recognized ASTM D- 6751 standards. In conclusion, the acid catalyst derived from onion peels shows significant potential for use as a heterogeneous catalyst in biodiesel production.