To provide an optical deflector, protecting a movable element disposed in a container and preventing contamination thereof, and reducing problems related to change in optical refraction state or aberration depending on the container.
The optical deflector includes a movable element 101a rotatably supported around a shaft 101b, a light reflecting element provided on the movable element, and a driving means 102 for driving the movable element. An incident optical beam 100 is reflected and deflected by the movable element 101a having the optical reflecting element. The movable element 101a is disposed within a container 103 enclosed by a wall surface including a light transmitting window 103a rotationally symmetric around the shaft 101b, and the reflected and deflected optical beam 100 is emitted through the light transmitting window 103a as scanning light.