The reason why sunglasses can block ultraviolet rays is because a special coating film is added to the lens to block and absorb ultraviolet rays, and also block a part of visible light, so that the transmittance of the lens is reduced. Therefore, high-quality sunglasses have strong ability to block ultraviolet rays, and the transmittance is not much decreased, and the coating film has a certain hardness and is not easy to wear.
To distinguish whether a pair of sunglasses has the function of preventing ultraviolet rays, you can see obvious marks such as "UV" and "UV400" on the labels or lenses of some products. The "UV index" is also the effect of filtering out ultraviolet rays, which is a very important criterion for purchasing sunglasses. Light with a wavelength between 286 nm and 400 nm is called ultraviolet light. Generally, a 100% UV index is impossible. Most sunglasses have a UV index between 96% and 98%.
Sunglasses labeled "UV400" can achieve a level of defense against more than 90% of the UV rays, and the lenses are specially processed to block UV rays with a wavelength of less than 400 nm. Those who wear contact lenses can choose a contact lens with UV protection, can filter out 90% of UV rays, and then wear sunglasses, the safety level is even higher.