The invention discloses a lens and an anti-glare LED (light-emitting diode) lamp. A top surface of the lens is an emergent light surface, a side surface of the lens is a total reflection surface or reflection surface, the bottom of the lens is provided with a sunken groove, the sunken groove is provided with an incidence side surface and an incidence top surface which allow light to enter the lens, and an extinction insert is fixed on the incidence top surface of the sunken groove; the anti-glare LED lamp comprises an LED light source and the lens, and the LED light source is located at the center of the opening of the sunken groove. Since the extinction insert is fixed in the sunken groove of the lens, compared with a conventional optical system without an extinction insert, the lens remarkably improves the edge glare of the ineffective area, and meanwhile, the change of the light intensity of the central effective area is tiny. The solution has the advantages of simple and compact structure, wide application range, high universality, low cost, easiness in control, wide anti-glare range and the like.