PURPOSE: To provide a photoelectric encoder which is improved in speed of response by suppressing the heat generation of a light emitting diode and increasing the light receiving quantity.
CONSTITUTION: In a photoelectric encoder equipped with a main and index scales 1 and 2 on which scales are respectively formed of optical gratings at prescribed pitches and which are counterposed to each other so that they can move against each other in the direction of intersecting the slits of the optical gratings, light emitting diode 3 for emitting parallel rays to the scale sections of the scales 1 and 2 from one side, collimating convex mirror 4, and photodetector 5 for detecting the brightness and darkness generated by the repeated overlapping of the optical gratings in the scale sections, the diode 3 is constituted of a plurality of slit-like light emitting sections 31a, 31b, and 31c arranged in parallel with the slits of the optical gratings of the scale sections.