The present invention provides a lens unit having a cover member which does not cause deviation in precision and capable of being manufactured efficiently at low cost. In a lens unit 10A, side surfaces of a cover member 14a continuing from a front end surface 29 to a rear end surface located at a lens side are formed in a regular quadrangular prism, at least two of corners of the regular quadrangular prism are in contact with an inner peripheral surface 27 of a housing space 17 of a holder 11a for housing the cover member 14a, a gap 34 is formed between each of the side surfaces of the cover member 14a and the inner peripheral surface 27 of the holder 11a, and an effective area of a light beam is located inside a light receiving area having a regular quadrangular shape surrounded by an outer peripheral edge of the front end surface 29 of the cover member 14a.