A lens module (200) includes a barrel (20), a lens (30) and a shielding layer (51). The barrel includes a screening end (21) and a mounting end (22) positioned opposite to the screening end, and defines an aperture (23) in the screening end. A diameter of the aperture reduces in a direction from the screening end to the mounting end so that the aperture has a large diameter and a small diameter. The lens is received in the barrel. The shielding layer made of an opaque film is mounted on the screening end and defines a receiving hole (511) aligned with the aperture. The receiving hole has a diameter being in a range of the large diameter and the small diameter.