PROBLEM TO BE SOLVED: To provide an optical switch having flat permeation characteristics.SOLUTION: An optical switch includes: an input port; an output port; a diffraction grating for demultiplexing the wavelength of an optical signal from the input port; and a LCOS for deflecting an optical signal subjected to wavelength demultiplexing to the output port. The diffraction grating is prearranged so that the shape of the optical signal when the optical signal enters into the LCOS is asymmetrical to an axis within the LCOS surface perpendicular to the wavelength axis of the diffraction grating.