An optical module includes a stem with a piercing hole, an optical element mounted on a top surface of the stem, a lead which passes through the piercing hole, one end of the lead being connected to the optical element, and an insulating material in the piercing hole and insulating the stem from the lead. An opening of the piercing hole on the top surface of the stem is smaller than an opening of the piercing hole on an underside of the stem.