A photodetector includes: a silicon layer of a first conductivity type; a first semiconductor layer that is provided in the silicon layer, of a first conductivity type, and having an impurity concentration higher than a carrier concentration of the silicon layer; a second semiconductor layer provided on the first semiconductor layer, of a second conductivity type, and forming a pn boundary with the first semiconductor layer; a third semiconductor layer provided in the silicon layer, of a first conductivity type, having an impurity concentration higher than that of the silicon layer, and separated from the first semiconductor layer; a first electrode connected to the silicon layer; and a second electrode connected to the second semiconductor layer.