Lycopene is known for protecting the skin from harmful UV rays, which is why it is widely used in cosmetics. In the present investigation, fruits and vegetables like Capsicum annuum ( C.a. ), Capsicum frutescens ( C.f. ), Carica papaya ( C. p. ), Citrullus lanatus ( C. l. ), and Solanum lycopersicum ( S. l. ) were used for the extraction and isolation of lycopene. The lycopene was isolated in acetone to solubilize hydrophilic and hydrophobic molecules and hydrolyzed into 5% sodium sulfate in a protic solvent mechanism. The measurement of lycopene content was done by UV–Vis spectrophotometer at 503 nm ( λ ), and the absence peak was in the range of 440–530 nm for the extracted lycopene. Furthermore, all the Petri plates were coated with a film of lycopene extracted at different concentrations on the bottom surface of the lid of the Petri plate. The concentrations of lycopene present in the samples were in the following ascending order from lowest to highest concentration: ( C.a. ) < ( C.f. ) < ( C. p. ) < ( C. l. ) < ( S. l. ). The pH value of the S. lycopersicum ( S. l. ) sample was found to be 6.2, the maximum amount of lycopene was found to be 3.36024 μg/mL, and the pH value of the C. annuum ( C.a. ) sample was found to be 4.5 and the minimum amount. Lycopene was found to be 0.31824 μg/mL. The R‐square of the obtained pH value was increased with the adequate amount of lycopene of good quality; the correlation variables between the pH value and lycopene percentage remained the same using the equation y = 56.60×−250.5, and their R 2 value was 1 > 0.968, found to be degraded, and lycopene percentage was calculated. Escherichia coli colonies protected from UV rays by lycopene film were counted after different intervals (24, 48, and 72 h). The effect of UV rays was measured in percentage at 10, 20, and 30 min of exposure to UV rays. Sample S. lycopersicum had the highest UV‐ray blocking potential, that is, 99.75%, and sample C. annuum had the lowest UV‐ray blocking percentage, that is, 77.78%. Further research and development will be required to determine its effectiveness, stability, and practicality for creating lycopene films as a barrier against UV rays.