Sugarcane (Saccharum officinarum L.) is used in various applications, including the production of raw sugar, to be consumed, either directly as food or sugarcane juice. It is reported that 1 ton of sugarcane would generate nearly 280 kg of bagasse and they would be burnt up and leads to air pollution. In fact, sugarcane bagasse contains high lignin content, having Ultraviolet (UV) protection properties. The objective of this study is to determine the best concentration of sodium hydroxide and temperature to extract high yield of lignin for UV protection properties. In this project, sugarcane bagasse is collected from hawker stall in Taman Universiti, Skudai, Johor, Malaysia. The lignin composition in sugarcane bagasse was analyzed, giving 16.7± 4.8 wt% of sugarcane bagasse. Alkali extraction of sugarcane bagasse has been carried out by using different concentration of sodium hydroxide (NaOH) (2%, 4%, 6%, 8%, 10%) and temperatures (60 °C, 80 °C, 100 °C, 120 °C, 140 °C) in water bath at a fixed time, 1 hour. According to the experiment conducted, the best condition is 10% NaOH concentration, temperature of 100 °C for 1 hour, as the highest yield of lignin can be extracted, which is 55.8±1.92 wt%, with a purity of 28.1±10.75%. Ultraviolet protection properties of lignin had been analyzed by determining the Sun Protection Factor (SPF). It was done by blending different concentration of lignin into a base cream. The SPF achieved for 5% lignin-blended cream was 4.76 and for 10% lignin-blended cream was 5.78 respectively.