Background: Indonesia is an equatorial country that is rich in sunlight all year. UV light is divided into three wavelength groups: UV-A (320-400nm), UV-B (280-320nm), and UV-C (100-290nm). Intracell chromophores in skin cell membranes such as riboflavin, porphyrin, nicotinamide, and enzymes will absorb the UV-A light. The UV-B light penetrates the dermis layer and causes DNA structure changes, which lead to wrinkles and a rising risk of skin cancer. Premature skin aging and skin cancer can be prevented with sunscreen preparation containing compounds that can protect the skin from UV radiation. Flavonoid is one of the purslane (Portulaca grandiflora) active metabolites that have the potency to be developed as sunscreen. Objective: This research aimed to determine the ability of purslane (Portulaca grandiflora) magenta flower variety herbs extract cream as a sunscreen as indicated by the %Te, %Tp, and Sun Protective Factor value. Methods: This research was an experimental study with various purslane magenta flower variety herbs extract cream formulas that were tested for their %Te, %Tp, and SPF value with a UV-Vis spectrophotometer. Results: The sunscreen cream preparation with 2.5% of purslane (Portulaca grandiflora) magenta flower variety herb extract had %Te, %Tp, and SPF values of 25.86 ± 2.41%, 36.05 ± 2.82%, and 3.97 ± 0.35 respectively. At the same time, preparations with 5% concentration of extract had %Te, %Tp, and SPF values of 8.23 ± 0.86%, 16.65 ± 0.92%, and 8.03 ± 0.38, respectively. Conclusion: The sunscreen activity of all extract concentration creams was significantly different compared to the negative control (cream base) in all parameters. Flavonoids are the compounds responsible for the sunscreen activity of purslane extract.